Find the probability distribution of number of heads in four tosses of a coin

#### Solution

When a coin is tossed four times, the sample space is

S = {HHHH, HHHT, HHTH, HTHH, THHH, HHTT, HTHT, HTTH, THHT, THTH, TTHH, HTTT, THTT, TTHT, TTTH, TTTT}

∴ n (S) = 16

Let X be the random variable, which represents the number of heads.

It can be seen that X can take the value of 0, 1, 2, 3, or 4.

When X = 0, then X = {TTTT}

∴ n (X) = 1

∴ P (X = 0) = `(n(X))/(n(S))=1/16`

When X = 1, then

X = {HTTT, THTT, TTHT, TTTH}

∴ n (X) = 4

∴ P (X = 1) = `(n(X))/(n(S))=4/16 = 1/4`

When X = 2, then

X = {HHTT, HTHT, HTTH, THHT, THTH, TTHH}

∴ n (X) = 6

∴ P (X = 2) = `(n(X))/(n(S))=6/16 = 3/8`

When X = 3, then

X = {HHHT, HHTH, HTHH, THHH}

∴ n (X) = 4

∴ P (X = 3) = `(n(X))/(n(S))=4/16 = 1/4`

When X = 4, then

X = {HHHH}

∴ n (X) = 1

∴ P (X = 4) = `(n(X))/(n(S))=1/16`

∴ the probability distribution of X is as follows :

X | 0 | 1 | 2 | 3 | 4 |

P (X) | `1/16` | `1/4` | `3/8` | `1/4` | `1/16` |