Random Variables

STAT 20: Introduction to Probability and Statistics

Warmup
15:00

Tossing a fair coin 3 times and counting the number of heads

Let \(X\) be the number of heads in three tosses of a fair coin. What is the probability mass function \(f(x) = P(X = x)\) of \(X\)? What is this distribution called? What values will \(x\) take?

  • \(f(x) = P(X = x)\), where \(X\) has the Binomial distribution
  • \(n=3\) and \(p=\dfrac{1}{2}\).
  • \(f(x) = \displaystyle \binom{3}{x}\left(\dfrac{1}{2}\right)^x \left(\dfrac{1}{2}\right)^{3-x}\)
  • \(x\) takes the values \(0, 1, 2, 3\)

Tossing a biased coin 3 times and counting the number of heads

What about if \(X\) is the number of heads in 3 tosses of a biased coin, where the chance of heads is \(\frac{2}{3}\)? Now what is \(f(x) = P(X = x)\)?

  • \(f(x) = P(X = x)\), where \(X\) has the Binomial distribution
  • \(n=3\) and \(p=\dfrac{2}{3}\).
  • \(f(x) = \displaystyle \binom{3}{x}\left(\dfrac{2}{3}\right)^x \left(\dfrac{1}{3}\right)^{3-x}\)
  • \(x\) takes the values \(0, 1, 2, 3\)

Tossing a fair coin until it lands heads

Now suppose we toss a fair coin until the first time it lands heads, and let \(X\) be the number of tosses (including the last one, which is the first time the coin lands heads). What is the probability mass function of \(X\)? Is it binomial?

\(P(X = x) = f(x) = \left(\dfrac{1}{2}\right)^{x-1}\left(\dfrac{1}{2}\right)\).

Not binomial since \(n\) not specified at the start.

What are the possible values of \(x\)?

Dealing cards and counting hearts

Finally, let’s consider a deck of cards, and we are interested in the number of hearts dealt in a hand of five. Call this number \(X\). What is the pmf of \(X\)?

Let \(X\) be the number of hearts in the hand of 5 cards. We know that \(X\) takes the values \(0, 1, 2,\ldots, 5\). Since we deal cards without replacement, we see that \(X\) has the hypergeometric distribution with parameters \(N = 52, \, G = 13, \, n =5\).

Concept review: \(f(x)\) and \(F(x)\)

  • \(f(x)\) is the probability mass function of \(X\). What does that mean? What is the connection to the distribution table? The probability histogram?

  • \(F(x)\) is the cumulative distribution function.

  • What is the connection between \(f\) and \(F\)?

Concept Questions

Rolling dice

Roll a pair of fair six-sided dice. Let \(X = 1\) if the dice show the same number of spots, and \(0\) otherwise.

For example, if both dice show \(2\), then \(X = 1\), but if one shows \(2\) and the other shows \(3\), then \(X = 0\).

What is \(P(X=1)\)?

01:00

Graphing the CDF

The graph of the cdf of a random variable \(X\) is shown below. What is \(F(2)\)? What about \(f(2)\)?

01:00

There’s a cold going around…

You have \(10\) people with a cold and you have a remedy with a \(20\%\) chance of success. What is the chance that your remedy will cure at least one sufferer? (Let \(X\) be the number of people cured among the 10. We are looking for the probability that \(X \ge 1\).)

What is the chance that at least one person is cured?

01:00

Poisson distributions

There are 4 histograms of different Poisson distributions below. Match each distribution to its parameter \(\lambda\). Recall that \(\lambda\) is how many occurrences we think will happen in a given period of time.

\[ (1)\: \lambda = 0.5 \hspace{2cm} (2)\: \lambda = 1 \hspace{2cm} (3) \: \lambda = 2 \hspace{2cm} (4) \: \lambda = 4\hspace{2cm} \]

01:00

Worksheet: Random Variables

20:00