Random Variables & Distributions
In this finale quiz, we'll apply what we know about random variables and probability distributions to real-world problems.
Since these applications are inspired by real-life scenarios, they're more challenging than the problems we looked at in the last two quizzes.
The final problem in particular requires calculus; it may be skipped without loss.
Random Variable Applications
The display of a certain phone brand gives out at random instants in time at a constant rate of kkk failures per second. If X XX is the number of breakdowns in the length of time t t t since its release, then X XX is distributed like a Poisson variable, which means: P(X=n)=λnn!e−λ, n=0,1,2,…, λ=kt P(X=n) = \frac{\lambda^{n}}{n!} e^{-\lambda}, \ n = 0 , 1 , 2 , \ldots, \ \ \ \ \lambda = k t P(X=n)=n!λn​e−λ, n=0,1,2,…, λ=kt What is the expected number of failures E[X]=∑n∈X's rangenP(X=n)=∑n=0∞nλnn!e−λ ?E[X] = \sum\limits_{n \in X\text{'s range}} n P(X = n) = \sum\limits_{n=0}^{\infty} n \frac{\lambda^{n}}{n!} e^{-\lambda} \ ?E[X]=n∈X's range∑​nP(X=n)=n=0∑∞​nn!λn​e−λ ?
Hint: The exponential function is defined by the infinite sum ex=∑n=0∞xnn!. e^{x} = \sum\limits_{n=0}^{\infty} \frac{x^n}{n!}.ex=n=0∑∞​n!xn​.
−λ - \lambda −λ λ \lambda λ 111 1λ \frac{1}{\lambda} λ1​
We'd also like to know how spread out these failures are from the average. Find the variance Var[X]=E[X2]−(E[X])2 \text{Var}[X] = E\big[X^2\big] - \big( E[X]\big)^2Var[X]=E[X2]−(E[X])2 for the number of display breakdowns from the last problem, which is distributed as P(X=n)=λnn!e−λ, n=0,1,2,…, where ex=∑n=0∞xnn!. P(X=n) = \frac{\lambda^{n}}{n!} e^{-\lambda}, \ n = 0 , 1 , 2 , \ldots, \ \ \text{where} \ e^{x} = \sum\limits_{n=0}^{\infty} \frac{x^n}{n!}.P(X=n)=n!λn​e−λ, n=0,1,2,…, where ex=n=0∑∞​n!xn​.
λ2\lambda^2λ2 λ\lambda λ 0 −λ-\lambda −λ
Let's say a particular trait, like hair or eye color, is determined by one pair of genes. Let D be the dominant gene, and R the recessive.
The possible gene combinations are DD (pure dominance), DR or RD (hybrid), or RR (pure recessive). Children with at least one copy of the dominant gene exhibit the dominant trait.
A child receives one gene from each parent, and assuming they're both hybrids, each of the child's genes is equally likely to be a D or an R.
If a pair of hybrid parents have a total of T children, of which N exhibit the dominant trait (i.e. have the dominant gene), what is P(N=n)? P(N = n ) ?P(N=n)?
Good to Know: The number of ways to choose k k k objects from a set of n n n is (nk)=n!k!(n−k)!,{n \choose k} = \frac{n!}{k!(n-k)!},(kn​)=k!(n−k)!n!​, where n!=n(n−1)(n−2)⋯1 n! = n(n-1)(n-2) \cdots 1n!=n(n−1)(n−2)⋯1 for n≥1\ n \geq 1 n≥1 and 0!=1.0! = 1.0!=1.
(Tn)(12)n { T \choose n }\left( \frac{1}{2} \right)^n (nT​)(21​)n (Tn)(14)n(34)T−n { T \choose n }\left( \frac{1}{4} \right)^n \left( \frac{3}{4} \right)^{T-n}(nT​)(41​)n(43​)T−n (Tn)(34)n(14)T−n { T \choose n }\left( \frac{3}{4} \right)^n \left( \frac{1}{4} \right)^{T-n}(nT​)(43​)n(41​)T−n
In a very large sample of families with eight children, what's the average number of children not showing the appearance of the dominant trait?
Hint: For a binomial random variable P(N=n)=(Tn)pn(1−p)T−n, E[N]=Tp. P(N=n) = { T \choose n }p^n \left( 1-p \right)^{T-n},\ E[N] = T p.P(N=n)=(nT​)pn(1−p)T−n, E[N]=Tp.
It's reported that the probability of winning a certain state lottery is about 18. \frac{1}{8}.81​. Let X X X be the number of tickets purchased up to and including the first win.
What is P(X=k) P( X = k ) P(X=k) for k=1,2,3,…? k = 1, 2, 3, \dots ? k=1,2,3,…?
(78)k18 \left( \frac{7}{8} \right)^{k} \frac{1}{8}(87​)k81​ (78)k−118\left( \frac{7}{8} \right)^{k-1} \frac{1}{8}(87​)k−181​ (18)k−178\left( \frac{1}{8} \right)^{k-1} \frac{7}{8}(81​)k−187​ (78)k−1\left( \frac{7}{8} \right)^{k-1} (87​)k−1
What's the probability of winning this lottery in five tries or less?
Good to Know: ∑j=0kpj=1−pk+11−p, 0<p<1\displaystyle \sum\limits_{j=0}^{k} p^{j} = \frac{1-p^{k+1}}{1-p} , \ 0 < p < 1j=0∑k​pj=1−p1−pk+1​, 0<p<1
1−(78)5 1-\left( \frac{7}{8}\right)^51−(87​)5 1−(78)4 1-\left( \frac{7}{8}\right)^41−(87​)4 (78)5 \left( \frac{7}{8}\right)^5(87​)5 1−(18)5 1-\left( \frac{1}{8}\right)^51−(81​)5
The distribution P(X=k)=(78)k−118 P(X=k) = \left( \frac{7}{8} \right)^{k-1} \frac{1}{8}P(X=k)=(87​)k−181​ is an example of a geometric distribution because of its relationship with the geometric sum ∑j=0∞pj=11−p, 0<p<1. \sum\limits_{j=0}^{\infty} p^{j} = \frac{1}{1-p} , \ 0 < p < 1.j=0∑∞​pj=1−p1​, 0<p<1. If the lotto from the last problem pays out $1,000 on a win but costs $1 per ticket, what's the average payout if you play to the first win?
Hint: The expected value of a function of a random variable is E[f(X)]=∑k∈X's rangef(k)P(X=k), E\big[f(X)\big] = \sum\limits_{ k \in X \text{'s range}} f(k) P(X = k ), E[f(X)]=k∈X's range∑​f(k)P(X=k), and ∑j=0∞jpj=p(1−p)2, 0<p<1. \sum\limits_{j=0}^{\infty} j p^{j} = \frac{p}{(1-p)^2}, \ 0 < p < 1.j=0∑∞​jpj=(1−p)2p​, 0<p<1.
$1,007 \$ 1,007$1,007 $992 \$ 992$992 $1,000 \$ 1,000$1,000 $7 \$ 7$7
We found it useful to assign distribution functions to continuous random variables: P(a≤X≤b)=∫x=ax=bf(x)dx P( a \leq X \leq b) = \int\limits_{x = a }^{x=b} f(x) dx P(a≤X≤b)=x=a∫x=b​f(x)dx for some density function f(x).f(x).f(x). For instance, the time t tt it takes for the decay of a radioactive carbon-14 atom into stable nitrogen-14 is distributed exponentially, which means: f(t)=ae−at, t≥0, f(t) = a e^{-a t} , \ t \geq 0, f(t)=ae−at, t≥0, where a>0a>0a>0 is a constant. What's the probability that a carbon-14 atom lasts at least as long as 1a? \frac{1}{a} ?a1​?
e−ae^{-a} e−a e−1e^{-1} e−1 e−1ae^{-\frac{1}{a}}e−a1​ e e e
In this quiz, we sampled some applications of continuous and discrete random variables and their probability distributions.
The rest of the course will explore these ideas and other applications in greater depth.