# Random Variables

STAT 20: Introduction to Probability and Statistics

## Agenda

• PS 8: time to work on it and then review
• Brief lecture and CQs on Random Variables
• Break
• PS 9 (random variables)
• If time, coin flipping graph

25:00

# Lecture

## Random variables

• Let $X$ be the number of heads in three tosses of a fair coin.

• 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 suppose we toss a fair coin until the first time it lands heads, and let $X$ be the number of tosses. What is the pmf of $X$? Is it binomial?

• 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$?

## $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

01:00

Is the following random variable binomial (if so, what are $n$ and $p$?), hypergeometric (if so , what are $N$, $G$, and $n$?), or neither?

Roll a fair ten-sided die 20 times. Let $X$ be the number of times we roll a multiple of 3.

Binomial, hypergeometric, or neither?

01:00

Is the following random variable binomial (if so, what are $n$ and $p$?), hypergeometric (if so , what are $N$, $G$, and $n$?), or neither?

YouGov surveyed about 1,900 adults and asked them if they thought that Kevin Mcarthy should be ousted from his role as speaker. Let $X$ be the number of people who responded “Yes”. The population of the US is about 335 million.

Binomial, hypergeometric, or neither?

01:00

Is the following random variable binomial (if so, what are $n$ and $p$?), hypergeometric (if so , what are $N$, $G$, and $n$?), or neither?

A six-sided die is tossed two times and the sum of the faces showing is $8$. Let $X$ be 1 if the sum is $8$ and $0$ otherwise.

Binomial, hypergeometric, or neither?

01:00

Is the following random variable binomial (if so, what are $n$ and $p$?), hypergeometric (if so , what are $N$, $G$, and $n$?), or neither?

A bag that has 6 pieces of fruit: 2 mangoes, 3 apples, and 1 orange. I reach into the bag and draw out one fruit at a time, selecting each fruit at random (so they are equally likely). Let $X$ be the number of draws until and including the first time I draw a apple.

Binomial, hypergeometric, or neither?

01:00

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?

03:00

Roll a pair of fair six-sided dice and let $X = 1$ if the dice land showing the same number of spots, and $0$ otherwise. For example, if both dice land $2$, then $X = 1$, but if one lands $2$ and the other lands $3$, then $X = 0$.

What is $P(X=1)$?

05:00