Demonstrate understanding of random variables
Demonstrate understanding of characteristics of binomial distributions.
Calculate accurate probabilities of discrete random variables and interpret them in a variety of settings.
A random variable, usually written \(X\), is a variable whose values are numerical quantities of possible outcomes from a random experiment.
A discrete random variable takes on only a finite or countable number of distinct values.
Example:
A continuous random variable takes on values which form an interval of numbers.
Example:
Classify each random variable as either discrete or continuous.
The number of boys in a randomly selected three-child family.
The temperature of a cup of coffee served at a restaurant.
The number of math majors in randomly selected group of 10 students.
The amount of rain recorded in a small town one day.
The probability distribution of a discrete random variable \(X\) is defined by the probability \(P(X=x)\) associated with each possible value \(x\) of the variable \(X\). The function \(p_X(x)=P(X=x)\) is called the probability mass function.
A probability distribution of a discrete random variable is usually characterized by a table of all possible values \(X\) together with probabilities \(P(X)\), or a probability histogram, or a formula.
A random variable \(X\) (discrete and continuous) always has a cumulative distribution function: \(F_X(x)=P(X\leq x)\) (= \(\sum\limits_{x_i\leq x} P(x_i)\) if \(X\) is discrete).
Basic rules of probability:
\(0\leq P(X=x)\leq 1\).
The sum of all the probabilities is 1, that is \(P(X\leq x_{max})=1\).
In particular, \(0\leq F_X(x)\leq 1\).
The cumulative distribution function \(F_X(x)\) is non-decreasing.
The probability distribution can be recovered from its cumulative distribution function. Indeed, for a discrete random variable \(X\), we have $$P(X=x_i)=P(X\le x_i)-P(X\le x_{i-1}),$$ where \(P(X\le x_i)=\sum\limits_{k=1}^i P(X=x_k)\).
Let \(X\) be the number of heads that are observed when tossing two fair coins.
Solution: The possible values of the number of heads are \(0\), \(1\) and \(2\). The probability distribution can be characterized by the following table:
\(x\) | 0 | 1 | 2 |
---|---|---|---|
\(P(X=x)\) | 0.25 | 0.5 | 0.25 |
From the table, we may find the following cumulative distributions: $$P(X\leq 1)=P(X=0)+P(X=1)=0.25+0.5=0.75.$$ $$P(X\leq 2)= P(X=0)+P(X=1)+P(X=2)=0.25+0.5+0.25=1.$$
The probability distribution of an unfair coin is characterized by the following histogram. Find the probability of getting at most 1 head.
Solution: Let \(X\) be the number of heads. From the probability histogram, we know that \(P(X=0)=0.36\), and \(P(X=1)=0.47\).
Then the probability of getting at most 1 head is $$ P(X\le 1)=P(X=0)+P(X=1)=0.36+0.47=0.83. $$
A pair of fair 6-sided dice were rolled. Let \(X\) denote the sum of the number of dots on the top faces.
Let \(X\) be a discrete random variable and \(p_X(x)=P(X=x)\) the probability mass function.
The expected value \(E(X)\) (also called mean and denoted by \(\mu\)) of the discrete random variable \(X\) is the number $$\mu=E(X)=\sum \Big[xp_X(x)\Big].$$
The variance \(\mathrm{Var}(X)\) (also denoted by \(\sigma^2\)) of the discrete random variable \(X\) is the number $$\sigma^2=\mathrm{Var(X)}=\sum \Big[(x-E(X))^2p_X(x)\Big].$$
The standard deviation \(\sigma\) of a discrete random variable \(X\) is the square root of its variance: $$\sigma=\sqrt{\sum (x-E(X))^2p_X(x)}.$$
One thousand raffle tickets are sold for $2 each. Each has an equal chance of winning. First prize is $500, second prize is $300, and third prize is $100. Find the expected value of gain, and interpret its meaning.
Solution: Let \(X\) denote the net gain from purchasing one ticket. The probability distribution for \(X\) is
\(x\) | 498 | 298 | 98 | -2 |
---|---|---|---|---|
\(P(X=x)\) | \(\frac{1}{1000}\) | \(\frac{1}{1000}\) | \(\frac{1}{1000}\) | \(\frac{997}{1000}\) |
The expected gain is $$E(X)= 498\cdot \frac{1}{1000}+ 298\cdot\frac{1}{1000}+98\cdot \frac{1}{1000}+(-2)\cdot \frac{997}{1000}=-1.1,$$ which means that when buying one ticket, the buyer may expect a loss of $1.1.
The wait times (rounded to multiples of 5) in the cafeteria at a Community College has the following probability distribution. Find the expected waiting time and the standard deviation.
\(x\) (minutes) | 5 | 10 | 15 | 20 | 25 |
---|---|---|---|---|---|
\(P(X=x)\) | 0.13 | 0.25 | 0.31 | 0.21 | 0.1 |
Solution: The expected waiting time is $$E(X)= 5\cdot 0.13 +10\cdot 0.25+15\cdot 0.31+20\cdot 0.21 + 25\cdot 0.1 = 14.5.$$ The standard deviation is then $$\scriptsize\begin{aligned}\sigma=&\sqrt{(5-14.5)^2\cdot 0.13 +(10-14.5)^2\cdot 0.25+(15-14.5)^2\cdot 0.31+(20-14.5)^2\cdot 0.21 + (25-14.5)^2\cdot 0.1}\\ \approx& 5.9. \end{aligned}$$
The probability distribution of an unfair die is given in the following table.
\(x\) | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|
\(P(X=x)\) | 0.18 | 0.12 | \(\,?\,\) | 0.14 | 0.23 | 0.17 |
Solution: Since the sum of probabilities must be 1, we know that $$ P(X=3)=1-(0.18+0.12+0.14+0.23+0.17)=0.16 $$
The mean is the weighted sum $$ % \scriptstyle \begin{aligned} \mu=&0.18\cdot 1+0.12\cdot 2+0.16\cdot 3+0.14\cdot 4+0.23\cdot 5+0.17\cdot 6\\ =&3.63. \end{aligned} $$
The variance is $$ \scriptstyle \begin{aligned} \sigma^2=&0.18(1-3.63)^2+0.12(2-3.63)^2+0.16(3-3.63)^2+0.14(4-3.63)^2+0.23(5-3.63)^2+0.17(6-3.63)^2\\ =&3.0331. \end{aligned} $$
Therefore, the standard deviation is $$ \sigma=\sqrt{\sigma^2}=\sqrt{3.0331}\approx 1.7416. $$
Seven thousand lottery tickets are sold for $5 each. One ticket will win $2,000, two tickets will win $750 each, and five tickets will win $100 each. Let \(X\) denote the net gain from the purchase of a randomly selected ticket.
A card is randomly selected from a standard deck and replaced. This experiment is repeated a total of \(5\) times.
Solution: This is a binomial experiment. The number to total trials is \(n=5\). The number of successes is \(3\). The chance of a success is \(p=\frac{13}{52}=\frac14\).
The probability of getting exactly \(3\) clubs is \(P(X=3)\).
Method 1: Using the binomial probability formula
$$\textstyle P(X=3)=\frac{5!}{3!2!} \left(\frac{1}{4}\right)^3\left(\frac34\right)^2=10\cdot\frac{9}{4^5}\approx 0.088.$$
Method 2: Using Excel
The probability \(P(X=3)\) can also be found by using the Excel function BINOM.DIST(3, 5, 1 / 4, FALSE)
.
To probability of getting at least \(3\) club is $$\textstyle P(X\geq 3) =1-P(X\leq 2)=1-(P(0)+P(1)+P(2))\approx 1-0.8965=0.1035.$$
To calculate \(P(X\leq 2)\), there are two methods.
Method 1: In Excel, \(P(X\le 2)\) =BINOM.DIST(2,5,0.25,TRUE)
\(\approx 0.8965\).
Method 1: As \(n=5\) and \(p=0.25\), we use the following portion of the cumulative binomial distribution table.
Binomial Probability Table n=5
n | x | 0.1 | 0.15 | 0.2 | 0.25 | 0.3 | 0.35 | 0.4 |
---|---|---|---|---|---|---|---|---|
5 | 0 | 0.5905 | 0.4437 | 0.3277 | 0.2373 | 0.1681 | 0.116 | 0.0778 |
5 | 1 | 0.3281 | 0.3915 | 0.4096 | 0.3955 | 0.3602 | 0.3124 | 0.2592 |
5 | 2 | 0.0729 | 0.1382 | 0.2048 | 0.2637 | 0.3087 | 0.3364 | 0.3456 |
5 | 3 | 0.0081 | 0.0244 | 0.0512 | 0.0879 | 0.1323 | 0.1811 | 0.2304 |
\(P(X\le 2) \approx 0.2373+0.3955+0.2637= 0.8965.\)
Let \(X\) be a binomial random variable with parameters \(n = 5\), \(p=0.2\). Find the probabilities
The mean of a binomial distribution of \(n\) trials is $$\mu =\sum \Big[xP(X=x)\Big]=\sum \left[x\cdot \dfrac{n!}{(n-x)!x!}p^x(1-p)^{n-x}\right] = np.$$
The variance of a binomial distribution of \(n\) trials is $$\sigma^2 =\sum \Big[(x-np)^2P(X=x)\Big]=\sum \Big[x^2P(X=x)-(np)^2\Big]=np(1-p).$$
The standard deviation of a binomial distribution of \(n\) trials is $$\sigma=\sqrt{np(1-p)}.$$
We consider an event \(E\) unusual if the probability \(P(E)\leq 5\%\).
Remark: \(\sum \left[x\cdot \dfrac{n!}{(n-x)!x!}p^x(1-p)^{n-x}\right] = np\cdot\sum \left[\dfrac{(n-1)!}{(n-x)!(x-1)!}p^{x-1}(1-p)^{n-x}\right] = np \cdot (p+(1-p))^{n-1} =np.\)
The probability that an egg in a retail package is cracked or broken is 0.02.
Solution: Since there are 12 eggs and the chance of getting a cracked egg is 0.02, the average number of cracked is \(\mu =np=12\cdot 0.02=0.24.\)
The standard deviation is \(\sigma=\sqrt{12\cdot 0.02\cdot(1-0.02)}\approx 0.4850.\)
Recall the Empirical rule: 95% data are within 2 standard deviation away from the mean. Since \(2>0.24+2\cdot 0.4850\), the chance of getting at least two cracked eggs is less than 5%, which is considered as unusual.
Note that the probability of getting at least two cracked eggs is \(P(X\geq 2)=1-P(X\leq 1)=\) 1-BINOM.DIST(1, 12, 0.02, TRUE)
\(\approx 0.9768922\).
Adverse growing conditions have caused 5% of grapefruit grown in a certain region to be of inferior quality. Grapefruit are sold by the dozen.
Find the average number of inferior quality grapefruit per box of a dozen.
A box that contains two or more grapefruit of inferior quality will cause a strong adverse customer reaction. Find the probability that a box of one dozen grapefruit will contain two or more grapefruit of inferior quality.
Extra Practice
Lab Instructions in Excel
Let \(X\) be a binomial random variable with parameters \(n\) and \(p\), that is \(X\sim B(n, p)\). In Excel, \(P(X=x)\) is given by BINOM.DIST(x, n, p, FALSE)
and \(P(X\le x)\) is given by BINOM.DIST(x, n, p, TRUE)
. You may click input function \(f_x\) and then search binom
to find the function.
Create a binomial distribution table for \(p=0.5\) and \(n=10\). (See the linked PDF for example)