Probability Distribution

This chapter discusses the concept of probability distribution.

Probability Distribution

When working with random variables, we can ask questions like "what is the probability that X equals 2 heads in three coin flips, or that Y equals a value greater than 2 on a die roll?". We'll work these example scenarios below.

Example 1

If we flip a coin three times, the sample space will look something like below:

S=HHH,HHT,HTH,HTT,THH,TTH,THT,TTTS = { HHH, HHT, HTH, HTT, THH, TTH, THT, TTT}

Now what is P(X=2)? In other words, what is the probability that X (the number of heads in three coin flips) is exactly equal to two? The outcomes that satisfy exactly two heads include: HHT, HTH and THH. Therefore we can say

P(X=2)=numberofoccurrencesofdesiredeventtotaloccurrencesP(X=2) = \frac{number\: of\: occurrences\: of\: desired\: event}{total\: occurrences}

P(X=2)=38P(X=2) = \frac{3}{8}

Example 2

Now let's try to work out the dice example. If we roll a die, it can come face up with the following values:

S=1,2,3,4,5,6S = {1, 2, 3, 4, 5, 6}

We defined the random variable Y as the value that shows face-up on the die. The outcomes satisfying Y > 2 include 3, 4, 5, and 6.

For a fair die, the probability of P(Y= any value in S) is 16 since any of the six values are equally likely to show face-up. However, if we ask what the probability is of Y > 2 happening, it would be equivalent of asking,

P(Y=3or4or5or6)=?=46=23P(Y=3\: or \:4 \: or \: 5 \: or \: 6) = ? =\frac{4}{6}=\frac{2}{3}

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.