# Analysing a binary variable

## Introduction

**(if you prefer to watch a video on this than read, click here)**

If you have a single binary variable, you are probably interested to know what the percentage is of each of the two options, and perhaps if the are significantly different from each other.

**Part 1: Descriptive statistics**

Use descriptive statistics to get an impression of the data, using:

- A frequency table to get an impression of the data.

Note that I’d not recommend to show a visualisation. There are only two categories, so simply mentioning the percentages and counts for each of the two categories should suffice.

**Part 2: Inferential statistics**

After the first impression determine what can be said about the population based on your sample data by:

- Performing a test to see if the percentages of the two categories are significantly different (one-sample binomial test)
- Determine how big the difference is (effect size with Cohen’s g)

The example

The example used in this chapter will be using a binary variable gender (which had the options male or female).

Let's get started by getting an impression of the sample data. How this can be done is discussed in the next section.

**Single binary variable**

Google adds