Practice Problem Set 7 – a discrete joint distribution

The practice problems presented here deal with a discrete joint distribution that is defined by multiplying a marginal distribution and a conditional distribution – similar to the joint distribution found here and here. Thus this post provides additional practice opportunities.

Practice Problems

Let $X$ be the value of a roll of a fair die. For $X=x$, suppose that $Y \lvert X=x$ has a binomial distribution with $n=4$ and $p=x / 10$.

Practice Problem 7-A
Compute the conditional binomial distributions $Y \lvert X=x$ where $x=1,2,3,4,5,6$.

Practice Problem 7-B
Calculate the joint probability function $P[X=x,Y=y]$ for $x=1,2,3,4,5,6$ and $y=0,1,2,3,4$.

Practice Problem 7-C
Determine the probability function for the marginal distribution of $Y$. Calculate the mean and variance of $Y$.

Practice Problem 7-D
Calculate the backward conditional probabilities $P[X=x \lvert Y=y]$ for all applicable $x$ and $y$.

Problems 7-A to 7-D are similar to the ones in this previous post.

Practice Problem 7-E
Calculate the mean and variance of $X$.

Practice Problem 7-F
Calculate the mean and variance of $Y$ (use the methods discussed here).

Practice Problem 7-G
Calculate the covariance $\text{Cov}(X,Y)$ and the correlation coefficient $\rho$.

Problems 7-E to 7-G are similar to the ones in this previous post.

.

.

.

.

.

.

.

.

Practice Problem 7-A

\displaystyle \begin{aligned} &P[Y=0 \lvert X=1]=0.6561 \\&P[Y=1 \lvert X=1]=0.2916 \\&P[Y=2 \lvert X=1]=0.0486 \\&P[Y=3 \lvert X=1]=0.0036 \\&P[Y=4 \lvert X=1]=0.0001 \end{aligned}

\displaystyle \begin{aligned} &P[Y=0 \lvert X=2]=0.4096 \\&P[Y=1 \lvert X=2]=0.4096 \\&P[Y=2 \lvert X=2]=0.1536 \\&P[Y=3 \lvert X=2]=0.0256 \\&P[Y=4 \lvert X=2]=0.0016 \end{aligned}

\displaystyle \begin{aligned} &P[Y=0 \lvert X=3]=0.2401 \\&P[Y=1 \lvert X=3]=0.4116 \\&P[Y=2 \lvert X=3]=0.2646 \\&P[Y=3 \lvert X=3]=0.0756 \\&P[Y=4 \lvert X=3]=0.0081 \end{aligned}

\displaystyle \begin{aligned} &P[Y=0 \lvert X=4]=0.1296 \\&P[Y=1 \lvert X=4]=0.3456 \\&P[Y=2 \lvert X=4]=0.3456 \\&P[Y=3 \lvert X=4]=0.1536 \\&P[Y=4 \lvert X=4]=0.0256 \end{aligned}

\displaystyle \begin{aligned} &P[Y=0 \lvert X=5]=0.0625 \\&P[Y=1 \lvert X=5]=0.25 \\&P[Y=2 \lvert X=5]=0.375 \\&P[Y=3 \lvert X=5]=0.25 \\&P[Y=4 \lvert X=5]=0.0625 \end{aligned}

\displaystyle \begin{aligned} &P[Y=0 \lvert X=6]=0.0256 \\&P[Y=1 \lvert X=6]=0.1536 \\&P[Y=2 \lvert X=6]=0.3456 \\&P[Y=3 \lvert X=6]=0.3456 \\&P[Y=4 \lvert X=6]=0.1296 \end{aligned}

Practice Problem 7-B

\displaystyle \begin{aligned} &P[Y=4,X=1]=\frac{0.0001}{6} \\&P[Y=4,X=2]=\frac{0.0016}{6} \\&P[Y=4,X=3]=\frac{0.0081}{6} \\&P[Y=4,X=4]=\frac{0.0256}{6} \\&P[Y=4,X=5]=\frac{0.0625}{6} \\&P[Y=4,X=6]=\frac{0.1296}{6} \end{aligned}

\displaystyle \begin{aligned} &P[Y=3,X=1]=\frac{0.0036}{6} \\&P[Y=3,X=2]=\frac{0.0256}{6} \\&P[Y=3,X=3]=\frac{0.0756}{6} \\&P[Y=3,X=4]=\frac{0.1536}{6} \\&P[Y=3,X=5]=\frac{0.25}{6} \\&P[Y=3,X=6]=\frac{0.3456}{6} \end{aligned}

\displaystyle \begin{aligned} &P[Y=2,X=1]=\frac{0.0486}{6} \\&P[Y=2,X=2]=\frac{0.1536}{6} \\&P[Y=2,X=3]=\frac{0.2646}{6} \\&P[Y=2,X=4]=\frac{0.3456}{6} \\&P[Y=2,X=5]=\frac{0.375}{6} \\&P[Y=2,X=6]=\frac{0.3456}{6} \end{aligned}

\displaystyle \begin{aligned} &P[Y=1,X=1]=\frac{0.2916}{6} \\&P[Y=1,X=2]=\frac{0.4096}{6} \\&P[Y=1,X=3]=\frac{0.4116}{6} \\&P[Y=1,X=4]=\frac{0.3456}{6} \\&P[Y=1,X=5]=\frac{0.25}{6} \\&P[Y=1,X=6]=\frac{0.1536}{6} \end{aligned}

\displaystyle \begin{aligned} &P[Y=0,X=1]=\frac{0.6561}{6} \\&P[Y=0,X=2]=\frac{0.4096}{6} \\&P[Y=0,X=3]=\frac{0.2401}{6} \\&P[Y=0,X=4]=\frac{0.1296}{6} \\&P[Y=0,X=5]=\frac{0.0625}{6} \\&P[Y=0,X=6]=\frac{0.0256}{6} \end{aligned}

Practice Problem 7-C

\displaystyle \begin{aligned} &P[Y=4]=\frac{0.2275}{6} \\&P[Y=3]=\frac{0.854}{6} \\&P[Y=2]=\frac{1.533}{6} \\&P[Y=1]=\frac{1.862}{6} \\&P[Y=0]=\frac{1.5235}{6} \end{aligned}

$\displaystyle E[Y]=1.4$

$\displaystyle E[Y^2]=3.22$

$\displaystyle Var[Y]=1.26$

Practice Problem 7-D

\displaystyle \begin{aligned} &P[X=1 \lvert Y=0]=\frac{0.6561}{1.5235}=0.4307 \\&P[X=2 \lvert Y=0]=\frac{0.4096}{1.5235}=0.2689 \\&P[X=3 \lvert Y=0]=\frac{0.2401}{1.5235}=0.1576 \\&P[X=4 \lvert Y=0]=\frac{0.1296}{1.5235}=0.0851 \\&P[X=5 \lvert Y=0]=\frac{0.0625}{1.5235}=0.0410 \\&P[X=6 \lvert Y=0]=\frac{0.0256}{1.5235}=0.0168 \end{aligned}

\displaystyle \begin{aligned} &P[X=1 \lvert Y=1]=\frac{0.2916}{1.862}=0.1566 \\&P[X=2 \lvert Y=1]=\frac{0.4096}{1.862}=0.2200 \\&P[X=3 \lvert Y=1]=\frac{0.4116}{1.862}=0.2211 \\&P[X=4 \lvert Y=1]=\frac{0.3456}{1.862}=0.1856 \\&P[X=5 \lvert Y=1]=\frac{0.25}{1.862}=0.1343 \\&P[X=6 \lvert Y=1]=\frac{0.1536}{1.862}=0.0825 \end{aligned}

\displaystyle \begin{aligned} &P[X=1 \lvert Y=2]=\frac{0.0486}{1.533}=0.0317 \\&P[X=2 \lvert Y=2]=\frac{0.1536}{1.533}=0.1002 \\&P[X=3 \lvert Y=2]=\frac{0.2646}{1.533}=0.1726 \\&P[X=4 \lvert Y=2]=\frac{0.3456}{1.533}=0.2254 \\&P[X=5 \lvert Y=2]=\frac{0.375}{1.533}=0.2446 \\&P[X=6 \lvert Y=2]=\frac{0.3456}{1.533}=0.2254 \end{aligned}

\displaystyle \begin{aligned} &P[X=1 \lvert Y=3]=\frac{0.0036}{0.854}=0.0042 \\&P[X=2 \lvert Y=3]=\frac{0.0256}{0.854}=0.0300 \\&P[X=3 \lvert Y=3]=\frac{0.0756}{0.854}=0.0885 \\&P[X=4 \lvert Y=3]=\frac{0.1536}{0.854}=0.1799 \\&P[X=5 \lvert Y=3]=\frac{0.25}{0.854}=0.2927 \\&P[X=6 \lvert Y=3]=\frac{0.3456}{0.854}=0.4047 \end{aligned}

\displaystyle \begin{aligned} &P[X=1 \lvert Y=4]=\frac{0.0001}{0.2275}=0.0004 \\&P[X=2 \lvert Y=4]=\frac{0.0016}{0.2275}=0.0070 \\&P[X=3 \lvert Y=4]=\frac{0.0081}{0.2275}=0.0356 \\&P[X=4 \lvert Y=4]=\frac{0.0256}{0.2275}=0.1125 \\&P[X=5 \lvert Y=4]=\frac{0.0625}{0.2275}=0.2747 \\&P[X=6 \lvert Y=4]=\frac{0.1296}{0.2275}=0.5697 \end{aligned}

Practice Problem 7-E

$\displaystyle E[X]=\frac{7}{2}=3.5$

$\displaystyle E[X^2]=\frac{91}{6}$

$\displaystyle Var[X]=\frac{35}{12}$

Practice Problem 7-F

$\displaystyle E[Y]=1.4$

$\displaystyle E[Y^2]=3.22$

$\displaystyle Var[Y]=1.26$

Practice Problem 7-G

$\displaystyle \text{Cov}(X,Y)=\frac{7}{6}$

$\displaystyle \rho=\frac{7}{6 \sqrt{3.675}}=0.60858$

Dan Ma statistical

Daniel Ma statistical

Dan Ma practice problems

Daniel Ma practice problems

Daniel Ma mathematics

Dan Ma math

Daniel Ma probability

Dan Ma probability

Daniel Ma statistics

Dan Ma statistics

Dan Ma mathematical

Daniel Ma mathematical

$\copyright$ 2019 – Dan Ma

Practice Problem Set 3 – The Big 3 Discrete Distributions

This post presents exercises on the big 3 discrete distributions – binomial, Poisson and negative binomial, reinforcing the concepts discussed in several blog posts (here and here).

A previous problem set on Poisson and gamma is found here.

A previous problem set on Poisson distribution is found here.

$\text{ }$

 Practice Problem 3-A The amount of damage from an auto collision accident is modeled by an exponential distribution with mean 5. Ten unrelated auto collision claims are examined by an insurance adjuster. What is the probability that five of the claims will have damages exceeding the mean damage amount? What is the probability that at most two of the claims will have damages exceeding the mean damage amount? What is the expected number of claims with damages exceeding the mean?

$\text{ }$

 Practice Problem 3-B The jackpot of the Powerball lottery can sometimes be in the hundreds of millions dollars. The odds of winning the jackpot are one in 292 million. However, there are prizes other than the jackpot (some of the lesser prizes are $100 and$7). The odds of winning a prize in Powerball are one in 24.87. A Powerball player buys one ticket every month for a year. What is the probability of winning at least one prize? What is the probability of winning at least two prizes? What is the probability of winning at least three prizes? What is the probability of winning at least four prizes? See here for the calculation of Powerball winning odds.

$\text{ }$

 Practice Problem 3-C According to a poll conducted by AAA, 94% of teen drivers acknowledge the dangers of texting and driving but 35% admitted to doing it anyway. In a random sample of 20 teen drivers, what is the probability that exactly five of the teen drivers do texting while driving? what is the probability that more than five of the teen drivers do texting while driving?

$\text{ }$

 Practice Problem 3-D According to aviation statistics in the commercial airline industry, approximately one in 225 bags or luggage that are checked is lost. A business executive will be flying frequently next year and will be checking 100 bags or luggage during that one year. Determine the probability that the business executive will not lose any bags or luggage during his travel. Determine the probability that the business executive will lose one or two bags or luggage during his travel.

$\text{ }$

 Practice Problem 3-E A large group of insured drivers are classified as high risk and low risk. About 10% of the drivers in this group are considered high risk while the remaining 90% are considered low risk drivers. The number of auto accidents in a year for a high risk driver in this group is modeled by a binomial distribution with mean 0.8 and variance 0.64. The number of auto accidents in a year for a low risk driver is modeled by a binomial distribution with mean 0.4 and variance 0.36. Suppose that an insured driver is randomly selected from this group. What is the probability that the randomly selected insured driver will have no auto accident in the next policy year? What is the probability that the randomly selected insured driver will have more than 1 auto accident in the next policy year? What is the variance of the number of auto accidents for the randomly selected insured drivers in the next policy year?

$\text{ }$

 Practice Problem 3-F The number of TV sets of a particular brand sold in a given week at an electronic store has a Poisson distribution with mean 4. Determine the probability that the store will sell more than 4 TV sets next week. Determine the minimum number of TV sets that the manager should order for the next week so that the probability of having more sales than available TV sets is less than 0.10.

$\text{ }$

 Practice Problem 3-G The number of vacant rooms in a given night in a certain hotel follows a Poisson distribution with mean 1.75. Three travelers without reservation walk into the hotel one night. Assume that they do not know each other. Determine the probability that rooms are available for all three travelers. Given that rooms are available for all three travelers, determine the probability that the hotel will still be able to accommodate three more travelers without reservation who also do not know each other.

$\text{ }$

 Practice Problem 3-H Cars running the red light arrive at a busy intersection according to a Poisson process with the rate of 0.5 per hour. What is the probability that there will be at most 4 cars running the red light in a 5-hour period? After a period of having no activities in running red light, what is the probability that it will take more than 90 minutes to see another car running the red light? After a period of having no activities in running red light, what is the probability that it will take more than 90 minutes to see two cars running the red light?

$\text{ }$

 Practice Problem 3-I Consider a roulette wheel consisting of 38 numbers – 1 through 36, and 0 and 00. A player always makes bets on one of the numbers 1 through 12. Determine the probability that the player will lose his first 5 bets. Determine the probability that the first win of the player will occur on the 5th bet. Determine the probability that the first win of the player will occur no later than the 5th bet.

$\text{ }$

 Practice Problem 3-J Suppose that roughly 10% of the adult population have type II diabetes. A researcher wishes to find 3 adult patients who are diabetic. Suppose that the researcher evaluate one patient at a time until finding three diabetic patients. What is the probability that the third diabetic patient is found after evaluating 10 or 11 patients?

$\text{ }$

 Practice Problem 3-K For any high risk insured driver, the number of auto accidents in a year has a negative binomial distribution with mean 1.6 and variance 2.88. One such insured driver is selected at random and observed for one year. What is the probability that the insured driver will have more than one accident?

$\text{ }$

 Practice Problem 3-L A discrete probability distribution has the following probability function. $\displaystyle P(X=k)=\frac{(k+1) (k+2)}{2} \ \biggl(\frac{4}{9} \biggr)^3 \ \biggl(\frac{5}{9} \biggr)^k \ \ \ \ \ k=0,1,2,3,\cdots$ Determine the mean and variance of $X$.

$\text{ }$

 Practice Problem 3-M A large pool of insureds is made up of two subgroups – low risk (75% of the pool) and high risk (25% of the pool). The number of claims in a year for each insured can be any non-negative integer 0, 1, 2, 3, … The number of claims in a year for each insured in the low risk group has a negative binomial distribution with mean 0.5 and variance 0.625. The number of claims in a year for each insured in the high risk group has a negative binomial distribution with mean 0.75 and variance 0.9375. If a randomly selected insured from the pool is observed to have one claim in a given year, what is the probability that the insured is a high risk insured?

$\text{ }$

 Practice Problem 3-N An American roulette wheel has 38 areas – numbers 1 through 36 and 0 and 00. A player bets on odd numbers (1, 3, 5, 7, …, 35). He leaves the game when he wins 5 bets. What is the expected number of bets the player will lose before winning 5 bets? What is the probability that the player will lose 5 bets before leaving the game?

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

3-A
• 0.171367
• 0.2247123
• $10 e^{-1}=3.67879$
3-B
• 0.388889698
• 0.081670443
• 0.010882596
• 0.000997406
3-C
• 0.127199186
• 0.754604255
3-D
• 0.640545556
• 0.348149413
3-E
• 0.43425
• 0.16795
• 0.6264
3-F
• $\displaystyle 1-\frac{103}{3} e^{-4}=0.371163065$
• min is 7 since $P(X>6)=0.11$ and $P(X>7)=0.0511$
3-G
• $\displaystyle 1-4.28125 e^{-1.75}=0.256030305$
• 0.035673762
3-H
• 0.891178019
• $\displaystyle e^{-0.75}=0.472366553$
• $\displaystyle 1.75 e^{-0.75}=0.826641467$
3-I
• $\displaystyle (13/19)^5=0.1499507895$
• $\displaystyle (6/19) (13/19)^4=0.0692$
• $\displaystyle 1-(13/19)^5=0.85$
3-J
• 0.036589713
3-K
• $\displaystyle \frac{304}{729}=0.417$
3-L
• 3.75
• 8.4375
3-M
• $\displaystyle \frac{0.0768}{0.2688}=0.2857$
3-M
• $\displaystyle \frac{50}{9}=5.56$
• 0.1213520403

Daniel Ma mathematics

Dan Ma math

Daniel Ma probability

Dan Ma probability

Daniel Ma statistics

Dan Ma statistics

$\copyright$ 2018 – Dan Ma

Calculating the probability distributions of order statistics

This post presents exercises on finding the probability distributions of order statistics to complement a discussion of the same topic.

Consider a random sample $X_1,X_2,\cdots,X_n$ drawn from a continuous distribution with common distribution function $F(x)$. The order statistics $Y_1 are obtained by ranking the sample items in increasing order. In this post, we present some exercises to complement this previous post. The thought processes illustrated by these exercises will be helpful in non-parametric inference, specifically in the construction of confidence intervals for unknown population percentiles.

In the problems that follow, $Y_1 are the order statistics that arise from the random sample $X_1,X_2,\cdots,X_n$. There are two ways to work with the probability distribution of an order statistic $Y_j$. One is to find the distribution function $F_{Y_j}(y)=P(Y_j \le y)$. Once this is obtained, the density function $f_{Y_j}(y)$ is derived by taking derivative. Another way is to derive $f_{Y_j}(y)$ directly.

We assume that the random sample $X_1,X_2,\cdots,X_n$ is drawn from a probability distribution with distribution function $F(x)=P(X \le x)$ and with density function $f(x)$. To compute $F_{Y_j}(y)=P(Y_j \le y)$, note that for the event $Y_j \le y$ to occur, at least $j$ many sample items $X_i$ are less than $y$. So the random drawing of each sample item is a Bernoulli trial with probability of success $F(y)=P(X \le y)$. Thus $F_{Y_j}(y)=P(Y_j \le y)$ is the following probability computed from a binomial distribution.

$\displaystyle F_{Y_j}(y)=P(Y_j \le y)=\sum \limits_{k=j}^n \ \binom{n}{k} \ F(y)^k \ \biggl[1-F(y) \biggr]^{n-k} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$

Once the distribution function $F_{Y_j}(y)$ is found, the density function $f_{Y_j}(y)$ can be derived by taking derivative on $F_{Y_j}(y)$. The density function $f_{Y_j}(y)$ can also be obtained directly by this thought process. Think of the density function $f_{Y_j}(y)$ as the probability that the $j$th order statistic $Y_j$ is right around $y$. So there must be $j-1$ sample items less than $y$ and $n-j$ sample items above $y$. One way this can happen is:

$\displaystyle F(y)^{j-1} \ f(y) \ \biggl[1-F(y) \biggr]^{n-j}$

The first term is the probability that $j-1$ sample terms are less than $y$. The second term is the probability that one sample item is right around $y$. The third term is the probability that $n-j$ sample items are above $y$. But this is only one way. To capture all possibilities, we multiply it by the multinomial coefficient.

$\displaystyle f(_{Y_j}(y)=\frac{n!}{(j-1)! \ 1! \ (n-j)!} \ F(y)^{j-1} \ f(y) \ \biggl[1-F(y) \biggr]^{n-j} \ \ \ \ \ \ \ \ \ \ (2)$

_____________________________________________________________________________________

Practice Problems

Practice Problems 1
Draw a random sample $X_1,X_2,\cdots,X_8$ of size 8 from the uniform distribution $U(0,4)$. Calculate the probability $P(Y_3>3)$ where $Y_3$ is the third order statistic.

$\text{ }$

Practice Problems 2
Draw a random sample $X_1,X_2,X_3,X_4,X_5$ of size 5 from a continuous distribution with density function $f(x)=\frac{x}{2}$ where $0. Find the probability that the sample median is less than 1.

$\text{ }$

Practice Problems 3
Draw a random sample $X_1,X_2,X_3,X_4,X_5$ of size 5 from the uniform distribution $U(0,4)$.

1. Calculate the distribution function $P(Y_4 \le y)$ for the fourth order statistic. Then differentiate it to obtain the density function $f_{Y_4}(y)$ of $Y_4$.
2. Use the thought process behind formula (2) above to directly write down the density function $f_{Y_4}(y)$ directly.

$\text{ }$

Practice Problems 4
Draw a random sample $X_1,X_2,\cdots,X_9$ of size 9 from an exponential distribution with mean $\frac{1}{\alpha}$.

1. Calculate the distribution function $P(Y_1 \le y)$ for the first order statistic (the minimum). Then differentiate it to obtain the density function $f_{Y_1}(y)$ of $Y_1$.
2. Use the thought process behind formula (2) above to directly write down the density function $f_{Y_1}(y)$ directly.

$\text{ }$

Practice Problems 5
Draw a random sample $X_1,X_2,\cdots,X_9$ of size 9 from an exponential distribution with mean $\frac{1}{\alpha}$.

1. Calculate the distribution function $P(Y_2 \le y)$ for the second order statistic. Then differentiate it to obtain the density function $f_{Y_2}(y)$ of $Y_2$.
2. Use the thought process behind formula (2) above to directly write down the density function $f_{Y_2}(y)$ directly.

$\text{ }$

Practice Problems 6
Draw a random sample $X_1,X_2,\cdots,X_8$ of size 8 from the uniform distribution $U(0,1)$. Find $E(Y_6)$, the expected value of the sixth order statistic.

$\text{ }$

Practice Problems 7
Draw a random sample $X_1,X_2,\cdots,X_{10}$ of size 10 from the uniform distribution $U(0,1)$. Find $Var(Y_9)$, the variance of the ninth order statistic.

$\text{ }$

Practice Problems 8
Draw a random sample $X_1,X_2,\cdots,X_{6}$ of size 6 from a population whose 25th percentile is 83. Find the probability the third order statistic $Y_3$ is less than 83.

$\text{ }$

Practice Problems 9
Draw a random sample $X_1,X_2,\cdots,X_{6}$ of size 6 from a population whose 75th percentile is 105. Find the probability the third order statistic $Y_3$ is less than 105.

$\text{ }$

Practice Problems 10
Draw a random sample $X_1,X_2,X_3,X_4$ of size 4 from an exponential distribution with mean 10. Calculate $P(Y_4>15 \ | \ Y_4 > 10)$.

$\text{ }$

Practice Problems 11
Draw a random sample $X_1,X_2,X_3,X_4,X_5$ of size 5 from a continuous distribution with density function $f(x)=\frac{x}{2}$ where $0. Find $E(Y_5)$, the expected value of the sample maximum.

$\text{ }$

Practice Problems 12
Draw a random sample of size 12 from an exponential distribution with mean 2. Calculate $P(Y_1>0.5 | Y_1 > 0.25)$.

$\text{ }$

_____________________________________________________________________________________

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$
_____________________________________________________________________________________

Practice Problems 1

• $\displaystyle P(Y_3>3)=\frac{277}{65536}$

$\text{ }$

Practice Problems 2

• $\displaystyle P(Y_3<1)=\frac{106}{1024}$

$\text{ }$

Practice Problems 3

• $\displaystyle f_{Y_4}(y)=20 \ \biggl( \frac{y}{4} \biggr)^3 \ \frac{1}{4} \ \biggl(1- \frac{y}{4} \biggr)$

$\text{ }$

Practice Problems 4

• $\displaystyle f_{Y_1}(y)=9 \alpha \ e^{-9 \alpha y}$

$\text{ }$

Practice Problems 5

• $\displaystyle f_{Y_2}(y)=72 \ \biggl(1-e^{-\alpha y} \biggr) \ \alpha e^{-\alpha y} \ \biggl( e^{-\alpha y} \biggr)^7$

$\text{ }$

Practice Problems 6

• $\displaystyle E(Y_6)=\frac{2}{3}$

$\text{ }$

Practice Problems 7

• $\displaystyle Var(Y_9)=\frac{3}{242}$

$\text{ }$

Practice Problems 8

• $\displaystyle P(Y_3<83)=\frac{694}{4096}$

$\text{ }$

Practice Problems 9

• $\displaystyle P(Y_3<105)=\frac{3942}{4096}$

$\text{ }$

Practice Problems 10

• $\displaystyle P(Y_4>15 \ | \ Y_4 > 10)$ = 0.756546693

$\text{ }$

Practice Problems 11

• $\displaystyle E(Y_5)=\frac{20}{11}$

$\text{ }$

Practice Problems 12

• $\displaystyle P(Y_1>0.5 | Y_1 > 0.25)=e^{-1.5}$

_____________________________________________________________________________________

$\copyright \ 2015 \text{ by Dan Ma}$

Practice Problems for Conditional Distributions, Part 1

The following are practice problems on conditional distributions. The thought process of how to work with these practice problems can be found in the blog post Conditionals Distribution, Part 1.

_____________________________________________________________________________________

Description of Problems

Suppose $X$ and $Y$ are independent binomial distributions with the following parameters.

For $X$, number of trials $n=5$, success probability $\displaystyle p=\frac{1}{2}$

For $Y$, number of trials $n=5$, success probability $\displaystyle p=\frac{3}{4}$

We can think of these random variables as the results of two students taking a multiple choice test with 5 questions. For example, let $X$ be the number of correct answers for one student and $Y$ be the number of correct answers for the other student. For the practice problems below, passing the test means having 3 or more correct answers.

Suppose we have some new information about the results of the test. The problems below are to derive the conditional distributions of $X$ or $Y$ based on the new information and to compare the conditional distributions with the unconditional distributions.

Practice Problem 1

• New information: $X.
• Derive the conditional distribution for $X \lvert X.
• Derive the conditional distribution for $Y \lvert X.
• Compare these conditional distributions with the unconditional ones with respect to mean and probability of passing.
• What is the effect of the new information on the test performance of each of the students?
• Explain why the new information has the effect on the test performance?

Practice Problem 2

• New information: $X>Y$.
• Derive the conditional distribution for $X \lvert X>Y$.
• Derive the conditional distribution for $Y \lvert X>Y$.
• Compare these conditional distributions with the unconditional ones with respect to mean and probability of passing.
• What is the effect of the new information on the test performance of each of the students?
• Explain why the new information has the effect on the test performance?

Practice Problem 3

• New information: $Y=X+1$.
• Derive the conditional distribution for $X \lvert Y=X+1$.
• Derive the conditional distribution for $Y \lvert Y=X+1$.
• Compare these conditional distributions with the unconditional ones with respect to mean and probability of passing.
• What is the effect of the new information on the test performance of each of the students?
• Explain why the new information has the effect on the test performance?

_____________________________________________________________________________________

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$
_____________________________________________________________________________________

To let you know that you are on the right track, the conditional distributions are given below.

The thought process of how to work with these practice problems can be found in the blog post Conditional Distributions, Part 1.

Practice Problem 1

$\displaystyle P(X=0 \lvert X

$\displaystyle P(X=1 \lvert X

$\displaystyle P(X=2 \lvert X

$\displaystyle P(X=3 \lvert X

$\displaystyle P(X=4 \lvert X

____________________

$\displaystyle P(Y=1 \lvert X

$\displaystyle P(Y=2 \lvert X

$\displaystyle P(Y=3 \lvert X

$\displaystyle P(Y=4 \lvert X

$\displaystyle P(Y=5 \lvert X

Practice Problem 2

$\displaystyle P(X=1 \lvert X>Y)=\frac{5}{3386}=0.0013$

$\displaystyle P(X=2 \lvert X>Y)=\frac{160}{3386}=0.04$

$\displaystyle P(X=3 \lvert X>Y)=\frac{1060}{3386}=0.2728$

$\displaystyle P(X=4 \lvert X>Y)=\frac{1880}{3386}=0.4838$

$\displaystyle P(X=5 \lvert X>Y)=\frac{781}{3386}=0.2$

____________________

$\displaystyle P(Y=0 \lvert X>Y)=\frac{31}{3386}=0.008$

$\displaystyle P(Y=1 \lvert X>Y)=\frac{390}{3386}=0.1$

$\displaystyle P(Y=2 \lvert X>Y)=\frac{1440}{3386}=0.37$

$\displaystyle P(Y=3 \lvert X>Y)=\frac{1620}{3386}=0.417$

$\displaystyle P(Y=4 \lvert X>Y)=\frac{405}{3386}=0.104$

Practice Problem 3

$\displaystyle P(X=0 \lvert Y=X+1)=\frac{15}{8430}=0.002$

$\displaystyle P(X=1 \lvert Y=X+1)=\frac{450}{8430}=0.053$

$\displaystyle P(X=2 \lvert Y=X+1)=\frac{2700}{8430}=0.32$

$\displaystyle P(X=3 \lvert Y=X+1)=\frac{4050}{8430}=0.48$

$\displaystyle P(X=4 \lvert Y=X+1)=\frac{1215}{8430}=0.144$

____________________

$\displaystyle P(Y=1 \lvert Y=X+1)=\frac{15}{8430}=0.002$

$\displaystyle P(Y=2 \lvert Y=X+1)=\frac{450}{8430}=0.053$

$\displaystyle P(Y=3 \lvert Y=X+1)=\frac{2700}{8430}=0.32$

$\displaystyle P(Y=4 \lvert Y=X+1)=\frac{4050}{8430}=0.48$

$\displaystyle P(Y=5 \lvert Y=X+1)=\frac{1215}{8430}=0.144$

_____________________________________________________________________________________

$\copyright \ 2013 \text{ by Dan Ma}$

Mixing Bowls of Balls

We present problems involving mixture distributions in the context of choosing bowls of balls, as well as related problems involving Bayes’ formula. Problem 1a and Problem 1b are discussed. Problem 2a and Problem 2b are left as exercises.

____________________________________________________________

Problem 1a
There are two identical looking bowls. Let’s call them Bowl 1 and Bowl 2. In Bowl 1, there are 1 red ball and 4 white balls. In Bowl 2, there are 4 red balls and 1 white ball. One bowl is selected at random and its identify is kept from you. From the chosen bowl, you randomly select 5 balls (one at a time, putting it back before picking another one). What is the expected number of red balls in the 5 selected balls? What the variance of the number of red balls?

Problem 1b
Use the same information in Problem 1a. Suppose there are 3 red balls in the 5 selected balls. What is the probability that the unknown chosen bowl is Bowl 1? What is the probability that the unknown chosen bowl is Bowl 2?

____________________________________________________________

Problem 2a
There are three identical looking bowls. Let’s call them Bowl 1, Bowl 2 and Bowl 3. Bowl 1 has 1 red ball and 9 white balls. Bowl 2 has 4 red balls and 6 white balls. Bowl 3 has 6 red balls and 4 white balls. A bowl is chosen according to the following probabilities:

\displaystyle \begin{aligned}\text{Probabilities:} \ \ \ \ \ &P(\text{Bowl 1})=0.6 \\&P(\text{Bowl 2})=0.3 \\&P(\text{Bowl 3})=0.1 \end{aligned}

The bowl is chosen so that its identity is kept from you. From the chosen bowl, 5 balls are selected sequentially with replacement. What is the expected number of red balls in the 5 selected balls? What is the variance of the number of red balls?

Problem 2b
Use the same information in Problem 2a. Given that there are 4 red balls in the 5 selected balls, what is the probability that the chosen bowl is Bowl i, where $i = 1,2,3$?

____________________________________________________________
Solution – Problem 1a

Problem 1a is a mixture of two binomial distributions and is similar to Problem 1 in the previous post Mixing Binomial Distributions. Let $X$ be the number of red balls in the 5 balls chosen from the unknown bowl. The following is the probability function:

$\displaystyle P(X=x)=0.5 \binom{5}{x} \biggl[\frac{1}{5}\biggr]^x \biggl[\frac{4}{5}\biggr]^{4-x}+0.5 \binom{5}{x} \biggl[\frac{4}{5}\biggr]^x \biggl[\frac{1}{5}\biggr]^{4-x}$

where $X=0,1,2,3,4,5$.

The above probability function is the weighted average of two conditional binomial distributions (with equal weights). Thus the mean (first moment) and the second moment of $X$ would be the weighted averages of the two same items of the conditional distributions. We have:

$\displaystyle E(X)=0.5 \biggl[ 5 \times \frac{1}{5} \biggr] + 0.5 \biggl[ 5 \times \frac{4}{5} \biggr] =\frac{5}{2}$
$\displaystyle E(X^2)=0.5 \biggl[ 5 \times \frac{1}{5} \times \frac{4}{5} +\biggl( 5 \times \frac{1}{5} \biggr)^2 \biggr]$

$\displaystyle + 0.5 \biggl[ 5 \times \frac{4}{5} \times \frac{1}{5} +\biggl( 5 \times \frac{4}{5} \biggr)^2 \biggr]=\frac{93}{10}$
$\displaystyle Var(X)=\frac{93}{10} - \biggl( \frac{5}{2} \biggr)^2=\frac{61}{20}=3.05$

See Mixing Binomial Distributions for a more detailed explanation of the calculation.

____________________________________________________________

Solution – Problem 1b
As above, let $X$ be the number of red balls in the 5 selected balls. The probability $P(X=3)$ must account for the two bowls. Thus it is obtained by mixing two binomial probabilities:

$\displaystyle P(X=3)=\frac{1}{2} \binom{5}{3} \biggl(\frac{1}{5}\biggr)^3 \biggl(\frac{4}{5}\biggr)^2+\frac{1}{2} \binom{5}{3} \biggl(\frac{4}{5}\biggr)^3 \biggl(\frac{1}{5}\biggr)^2$

The following is the conditional probability $P(\text{Bowl 1} \lvert X=3)$:

\displaystyle \begin{aligned} P(\text{Bowl 1} \lvert X=3)&=\frac{\displaystyle \frac{1}{2} \binom{5}{3} \biggl(\frac{1}{5}\biggr)^3 \biggl(\frac{4}{5}\biggr)^2}{P(X=3)} \\&=\frac{16}{16+64} \\&=\frac{1}{5} \end{aligned}

Thus $\displaystyle P(\text{Bowl 1} \lvert X=3)=\frac{4}{5}$

____________________________________________________________

Problem 2a
Let $X$ be the number of red balls in the 5 balls chosen random from the unknown bowl.

$E(X)=1.2$
$Var(X)=1.56$

Problem 2b

$\displaystyle P(\text{Bowl 1} \lvert X=4)=\frac{27}{4923}=0.0055$

$\displaystyle P(\text{Bowl 2} \lvert X=4)=\frac{2304}{4923}=0.4680$

$\displaystyle P(\text{Bowl 3} \lvert X=4)=\frac{2592}{4923}=0.5265$

A Binomial Example

This post discusses the limited version of a counting problem that can be solved by using the binomial distribution. The more general problem is also discussed.

Example 1
Suppose 7 dice are rolled. What is the probability that at least 4 of the dice show the same face?

Example 2
Suppose that 6 job assignments are randomly assigned to 5 workers. What is the probability that at least 4 of the job assignments go to the same worker?

Example 2 is left as exercise.

Discussion of Example 1

First, we discuss how to solve using the binomial distribution. Fix a face (say 1). Finding the probability of that at least 4 of the dice show the face 1 is a binomial problem. Then multiplying this answer by 6 will give the desired answer.

Consider obtaining a 1 as a success. Let $X$ be the number of successes when 7 dice are thrown. Then $X$ is $\text{binom}(7,\frac{1}{6})$. We have the following calculation:

\displaystyle \begin{aligned}(1) \ \ \ \ \ P(X \ge 4)&=1-P(X \le 3) \\&=1-P(X=0)-P(X=1) \\&- \ \ \ P(X=2)-P(X=3) \\&=1-\binom{7}{0} \biggl[\frac{1}{6} \biggr]^0 \biggr[\frac{5}{6} \biggr]^7 - \binom{7}{1} \biggl[\frac{1}{6} \biggr]^1 \biggr[\frac{5}{6} \biggr]^6 \\&- \ \ \ \binom{7}{2} \biggl[\frac{1}{6} \biggr]^2 \biggr[\frac{5}{6} \biggr]^5 - \binom{7}{3} \biggl[\frac{1}{6} \biggr]^3 \biggr[\frac{5}{6} \biggr]^4 \\&=\frac{4936}{279936} \end{aligned}

Multiplying $(1)$ by 6 produces the desired answer.

\displaystyle \begin{aligned}(2) \ \ \ \ \ 6 \times P(X \ge 4)&=6 \times \frac{4936}{279936} \\&=\frac{29616}{279936} \\&=0.105796 \end{aligned}

Note that in rolling 7 dice, only one face can appear 4 or more times. The binomial distribution $\text{binom}(7,\frac{1}{6})$ counts the number of ways one particular face (say 1) can appear 4 or more times. There are six such binomial distributions (one for each face). These six binomial distributions do not overlap. So we can obtain the answer by multiplying the binomial result by 6.

If more dice are rolled, the different binomial distributions will overlap. In fact, in rolling 8 dice, it is possible that 2 faces can appear 4 times (e.g. the face 1 appears 4 times and the face 2 appears 4 times). If we multiple the binomial calculated result by 6, the result would not be correct. To work the problem of rolling 8 or more dice, we need to use the multinomial theorem. See this post a discussion of using multinomial theorem.

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\text{ }$

$\displaystyle \frac{1325}{15625}=0.0848$

Dan Ma statistical

Daniel Ma statistical

Dan Ma practice problems

Daniel Ma practice problems

Daniel Ma mathematics

Dan Ma math

Daniel Ma probability

Dan Ma probability

Daniel Ma statistics

Dan Ma statistics

Dan Ma mathematical

Daniel Ma mathematical

$\copyright$ 2012 – 2019 – Dan Ma

An Example on Calculating Covariance

The practice problems presented here are continuation of the problems in this previous post.

Problem 1

Let $X$ be the value of one roll of a fair die. If the value of the die is $x$, we are given that $Y \lvert X=x$ has a binomial distribution with $n=x$ and $p=\frac{1}{4}$ (we use the notation $\text{binom}(x,\frac{1}{4})$ to denote this binomial distribution).

1. Compute the mean and variance of $X$.
2. Compute the mean and variance of $Y$.
3. Compute the covariance $Cov(X,Y)$ and the correlation coefficient $\rho$.

Problem 2

Let $X$ be the value of one roll of a fair die. If the value of the die is $x$, we are given that $Y \lvert X=x$ has a binomial distribution with $n=x$ and $p=\frac{1}{2}$ (we use the notation $\text{binom}(x,\frac{1}{2})$ to denote this binomial distribution).

1. Compute the mean and variance of $X$.
2. Compute the mean and variance of $Y$.
3. Compute the covariance $Cov(X,Y)$ and the correlation coefficient $\rho$.

Problem 2 is left as exercise. A similar problem is also found in this post.

Discussion of Problem 1

The joint variables $X$ and $Y$ are identical to the ones in this previous post. However, we do not plan on following the approach in the previous, which is to first find the probability functions for the joint distribution and then the marginal distribution of $Y$. The calculation of covariance in Problem 1.3 can be very tedious by taking this approach.

Problem 1.1
We start with the easiest part, which is the random variable $X$ (the roll of the die). The variance is computed by $Var(X)=E(X^2)-E(X)^2$.

(1)……$\displaystyle E(X)=\frac{1}{6} \biggl[1+2+3+4+5+6 \biggr]=\frac{21}{6}=3.5$

(2)……$\displaystyle E(X^2)=\frac{1}{6} \biggl[1^2+2^2+3^2+4^2+5^2+6^2 \biggr]=\frac{91}{6}$

(3)……$\displaystyle Var(X)=\frac{91}{6}-\biggl[\frac{21}{6}\biggr]^2=\frac{105}{36}=\frac{35}{12}$

Problem 1.2

We now compute the mean and variance of $Y$. The calculation of finding the joint distribution and then finding the marginal distribution of $Y$ is tedious and has been done in this previous post. We do not take this approach here. Instead, we find the unconditional mean $E(Y)$ by weighting the conditional mean $E(Y \lvert X=x)$. The weights are the probabilities $P(X=x)$. The following is the idea.

(4)……\displaystyle \begin{aligned} E(Y)&=E_X[E(Y \lvert X=x)] \\&= E(Y \lvert X=1) \times P(X=1) \\&+ E(Y \lvert X=2) \times P(X=2)\\&+ E(Y \lvert X=3) \times P(X=3) \\&+ E(Y \lvert X=4) \times P(X=4) \\&+E(Y \lvert X=5) \times P(X=5) \\&+E(Y \lvert X=6) \times P(X=6) \end{aligned}

We have $P(X=x)=\frac{1}{6}$ for each $x$. Before we do the weighting, we need to have some items about the conditional distribution $Y \lvert X=x$. Since $Y \lvert X=x$ has a binomial distribution, we have:

(5)……$\displaystyle E(Y \lvert X=x)=\frac{1}{4} \ x$

(6)……$\displaystyle Var(Y \lvert X=x)=\frac{1}{4} \ \frac{3}{4} \ x=\frac{3}{16} \ x$

For any random variable $W$, $Var(W)=E(W^2)-E(W)^2$ and $E(W^2)=Var(W)+E(W)^2$. The following is the second moment of $Y \lvert X=x$, which is needed in calculating the unconditional variance $Var(Y)$.

(7)……\displaystyle \begin{aligned} E(Y^2 \lvert X=x)&=\frac{3}{16} \ x+\biggl[\frac{1}{4} \ x \biggr]^2 \\&=\frac{3x}{16}+\frac{x^2}{16} \\&=\frac{3x+x^2}{16} \end{aligned}

We can now do the weighting to get the items of the variable $Y$.

(8)……\displaystyle \begin{aligned} E(Y)&=\frac{1}{6} \biggl[\frac{1}{4} +\frac{2}{4}+\frac{3}{4}+ \frac{4}{4}+\frac{5}{4}+\frac{6}{4}\biggr] \\&=\frac{7}{8} \\&=0.875 \end{aligned}

(9)……\displaystyle \begin{aligned} E(Y^2)&=\frac{1}{6} \biggl[\frac{3(1)+1^2}{16} +\frac{3(2)+2^2}{16}+\frac{3(3)+3^2}{16} \\&+ \frac{3(4)+4^2}{16}+\frac{3(5)+5^2}{16}+\frac{3(6)+6^2}{16}\biggr] \\&=\frac{154}{96} \\&=\frac{77}{48} \end{aligned}

(10)……\displaystyle \begin{aligned} Var(Y)&=E(Y^2)-E(Y)^2 \\&=\frac{77}{48}-\biggl[\frac{7}{8}\biggr]^2 \\&=\frac{161}{192} \\&=0.8385 \end{aligned}

Problem 1.3

The following is the definition of covariance of $X$ and $Y$:

(11)……$\displaystyle Cov(X,Y)=E[(X-\mu_X)(Y-\mu_Y)]$

where $\mu_X=E(X)$ and $\mu_Y=E(Y)$.

The definition (11) can be simplified as:

(12)……$\displaystyle Cov(X,Y)=E[XY]-E[X] E[Y]$

To compute $E[XY]$, we can use the joint probability function of $X$ and $Y$ to compute this expectation. But this is tedious. Anyone who wants to try can go to this previous post to obtain the joint distribution.

Note that the conditional mean $E(Y \lvert X=x)=\frac{x}{4}$ is a linear function of $x$. It is a well known result in probability and statistics that whenever a conditional mean $E(Y \lvert X=x)$ is a linear function of $x$, the conditional mean can be written as:

(13)……$\displaystyle E(Y \lvert X=x)=\mu_Y+\rho \ \frac{\sigma_Y}{\sigma_X} \ (x-\mu_X)$

where $\mu$ is the mean of the respective variable, $\sigma$ is the standard deviation of the respective variable and $\rho$ is the correlation coefficient. The following relates the correlation coefficient with the covariance.

(14)……$\displaystyle \rho=\frac{Cov(X,Y)}{\sigma_X \ \sigma_Y}$

Comparing (5) and (13), we have $\displaystyle \rho \frac{\sigma_Y}{\sigma_X}=\frac{1}{4}$ and

(15)……$\displaystyle \rho = \frac{\sigma_X}{4 \ \sigma_Y}$

Equating (14) and (15), we have $Cov(X,Y)=\frac{\sigma_X^2}{4}$. Thus we deduce that $Cov(X,Y)$ is one-fourth of the variance of $X$. Using $(3)$, we have:

(16)……$\displaystyle Cov(X,Y) = \frac{1}{4} \times \frac{35}{12}=\frac{35}{48}=0.72917$

Plug in all the items of (3), (10), and (16) into (14), we obtained $\rho=0.46625$. Both $\rho$ and $Cov(X,Y)$ are positive, an indication that both variables move together. When one increases, the other variable also increases. Thus makes sense based on the definition of the variables. For example, when the value of the die is large, the number of trials of $Y$ is greater (hence a larger mean).

A similar problem is also found in this post.

.

.

.

.

.

.

.

.

$\displaystyle E[X]=\frac{7}{2}$

$\displaystyle Var[X]=\frac{35}{12}$

$\displaystyle E[Y]=\frac{7}{4}$

$\displaystyle Var[Y]=\frac{77}{48}$

$\displaystyle \text{Cov}(X,Y)=\frac{35}{24}$

$\displaystyle \rho=\sqrt{\frac{5}{11}}=0.67419986$

Dan Ma statistical

Daniel Ma statistical

Dan Ma practice problems

Daniel Ma practice problems

Daniel Ma mathematics

Dan Ma math

Daniel Ma probability

Dan Ma probability

Daniel Ma statistics

Dan Ma statistics

Dan Ma mathematical

Daniel Ma mathematical

$\copyright$ 2012-2019 – Dan Ma