# Let x represent the difference between the number of heads and the number of tails obtained when a coin is tossed n times. What are the possible values of x?

The aim of this question is to understand the key concept of a random variable using the coin toss experiment which is the most basic binomial (experiment with two possible outcomes) experiment performed in probability theory.

A random variable is nothing but a mathematical formula used to describe the outcome of statistical experiments. For example, X is a random variable defined as the difference of head and tail outcomes out of n experiments in this question.

The concept of random variables is essential for understanding the further key concepts of process probability and its functions.

Let:

$\text{ total number of coin tosses } \ = \ n$

And:

$\text{ number of tails } \ = \ t$

Then, the no. of heads can be found using following formula:

$\text{ number of heads } \ = \ h \ = \ n \ – \ t$

Since $X$ is defined as the difference of total number of heads and tails, it can be calculated using following formula:

$X \ = h \ – \ t \ = \ ( \ n \ – \ t \ ) \ – \ t \ = \ h \ – \ t \ – \ t \ = \ h \ – \ 2t \$

Thus possible values of $X$ can be written in mathematical form as:

$X \ = \ \bigg \{ \ n \ – \ 2t \ \bigg | \ t \ = \ \{ \ 0, \ 1, \ 2, \ , ……, \ n \ \} \ \bigg \}$

## Numerical Result

$\text{ Possible values of } X \ = \ \bigg \{ \ n \ – \ 2t \ \bigg | \ t \ = \ \{ \ 0, \ 1, \ 2, \ , ……, \ n \ \} \ \bigg \}$

## Example

A coin is tossed 100 times and tail came up in 45 experiments. Find the value of $X$.

For this case:

$n \ = \ 100$

$t \ = \ 45$

Hence:

$h \ = \ 100 \ – \ 45 \ = \ 55$

$X$ can be calculated using following formula:

$X \ = 55 \ – \ 45 \ = \ 10$

Which is the value of $X$ when $45$ tails show up in $100$ coin tosses