If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Constructing a probability distribution for random variable

Sal breaks down how to create the probability distribution of the number of "heads" after 3 flips of a fair coin. Created by Sal Khan.

## Want to join the conversation?

• At how can P(X=2) = 3/8. when there are also 2 H in HHH? Why the HHH is not considered for P(X=2)?
• When we say X=2, we mean exactly 2. If we wanted to include HHH, we'd say P( X ≥ 2 ).
• How would you find the probablility when your have P(5)
• I agree, it is impossible to have 5 heads in a coin toss occurring only three times but if you were to have to flip a coin 5 times and finding out the number of times it is heads your answer would be:
p=(X=1/32) because HHHHH is the only answer for 5 heads in a coin toss that occurs five times.
In this situation, Master Salman is doing a coin toss only three times.
So there is no probability distribution for 5 heads because that is impossible.
Thank you!
• Am I seeing potential pattern or connection between pascals triangle and the probability of flipping 1, 2 , or three heads 3 at ? Can that be used for anything in probability in the future? Or is this just a coincidence? It seems like it still works for the possibility of 4 coins (1 possibility of all tails, then 4 of 3 tails, six of 2 tails, 4 of 1 tail, 1 of no tails)
• A man has three job interviews. The probability of getting the first interview is .3 the second .4 and third .5 suppose the man stops interviewing after he gets a job offer. Construct a probability distribution for X. I assumed due to the probabilities not adding exactly to one that it can't be done. Any help?
• It may help to draw a tree diagram:

``        Interview 1            |------------------------|                      | Get it             Not get it  0.3                 0.7                       |                  Interview 2                       |         ---------------------         |                   |       Get it             Not get it        0.4                 0.6                             |                        Interview 3                             |               ---------------------               |                   |            Get it             Not get it              0.5                 0.5``

There are four leaves on this tree. Assuming that the jobs are independent, then:

Get job 1: probability = 0.3 = 0.3
Get job 2: probability = 0.7 × 0.4 = 0.28
Get job 3: probability = 0.7 × 0.6 × 0.5 = 0.21
Get no job: probability = 0.7 × 0.6 × 0.5 = 0.21

And these add up to 1.
• what aren't HHT and THH considered the same thing? is it the order that differentiates the two?
• They are considered two different outcomes.
Think of it as of flip of three coins of different value. Each is individual and shows tails or heads so you can tell which coin is tails or heads.
If HHT, THH and HTH are considered the same thing P(HTT and THH and HTH) = 1/8.
Then P(HTT and TTH and THT) = 1/8. P(HHH)=1/8, P(TTT) = 1/8.
Sum of this possibilities is 4/8. But we know, that the sum of all the possibilities of an event must equal 1. So you see there's flaw in this logic in terms of probability.
• At Sal says 'You can have probability larger than 1", how is that possible?
• If you check the transcript, he is actually saying "You can't have a probability larger than 1". Your intuition was correct, the largest probability comes when every element of the sample space meets the criterion, and that's a probability of 1.
• Shouldn't the probability distribution be composed of thin vertical lines rather than bars? As it's drawn, it looks like a continuous variable rather than a discrete one. There should be a 0 probability of having any non-integer value.
• If for example we have a random variable that contains terms like pi or fraction with non recurring decimal values ,will that variable be counted as discrete or continous ? According my understanding eventhough pi has infinte long decimals , it still represents a single value or fraction 22/7 so if random variables has any of multiples of pi , then it should be discrete
• Correct. Discrete vs continuous only considers the number of possible outcomes (more or less), but not what those outcomes are. The values can be irrational, like pi, but if there are distinct multiples it takes, then it's discrete.
• how can we have probability greater than 1?
• We cannot. A probability equal to 1 means certainty, an event with probability equal to 1 is sure to happen, no questions asked, it's impossible to be more certain, and therefore it's impossible to have a probability greater than 1.

If during a problem you end up with a probability greater than 1, then you have to go back because somewhere before that point you have an error in your calculations.