• Home
  • Textbooks
  • Probability and Statistics with R
  • Univariate Probability Distributions

Probability and Statistics with R

Maria Dolores Ugarte, Ana F. Militino, Alan T. Arnholt

Chapter 4

Univariate Probability Distributions - all with Video Answers

Educators


Chapter Questions

06:52

Problem 1

Derive the mean and variance for the discrete uniform distribution.

Amany Waheeb
Amany Waheeb
Numerade Educator
06:16

Problem 2

Construct a plot for the probability mass function and the cumulative probability distribution of a binomial random variable $\operatorname{Bin}(n=8, \pi=0.3)$. Find the smallest value of $k$ such that $\mathbb{P}(X \leq k) \geq 0.44$ when $X \sim \operatorname{Bin}(n=8, \pi=0.7)$. Calculate $\mathbb{P}(Y \geq 3)$ if $Y \sim \operatorname{Bin}(20,0.2)$.

Robin Corrigan
Robin Corrigan
Numerade Educator
00:39

Problem 3

Let $X$ be a Poisson random variable with mean equal to 2. Find $\mathbb{P}(X=0), \mathbb{P}(X \geq 3)$, and $\mathbb{P}(X \leq k) \geq 0.70$.

Sriparna Bhattacharjee
Sriparna Bhattacharjee
Numerade Educator
02:03

Problem 4

Let $X$ be an exponential random variable $\operatorname{Exp}(\lambda=3)$. Find $\mathbb{P}(2<X<6)$.

Wendi Zhao
Wendi Zhao
Numerade Educator
02:01

Problem 5

Fix the seed value at 500 , and generate a random sample of size $n=10000$ from a Unif $(0,1)$ distribution. Calculate the sample mean and the sample variance. Are your answers within $2 \%$ of the theoretical values for the mean and variance of a Unif $(0,1)$ distribution?

Christopher Stanley
Christopher Stanley
Numerade Educator
02:01

Problem 6

Fix the seed value at 50 , and generate a random sample of size $n=10000$ from an exponential distribution with $\lambda=2$. Create a density histogram and superimpose the histogram with a theoretical $\operatorname{Exp}(\lambda=2)$ distribution. Calculate the sample mean and the sample variance of the randomly generated values. Are your answers within $2 \%$ of the theoretical values for the mean and variance of an $\operatorname{Exp}(\lambda=2)$ distribution?

Christopher Stanley
Christopher Stanley
Numerade Educator
01:44

Problem 7

The Laplace distribution, also known as a double exponential, has a pdf given by
$$
f(x)=\frac{\lambda}{2} \cdot \mathrm{e}^{-\lambda|x-\mu|} \text {, where }-\infty<x<\infty,-\infty<\mu<\infty, \lambda>0 .
$$
(a) Find the theoretical mean and variance of a Laplace distribution.
(b) Let $X_1$ and $X_2$ be independent exponential random variables, each with parameter $\lambda$. The distribution of $Y=X_1-X_2$ is a Laplace distribution with a mean of zero and a standard deviation of $\sqrt{2} / \lambda$. Set the seed equal to 3 , and generate 25,000 $X_1$ values from an $\operatorname{Exp}\left(\lambda=\frac{1}{2}\right)$ and $25,000 X_2$ values from another $\operatorname{Exp}\left(\lambda=\frac{1}{2}\right)$ distribution. Use these values to create the simulated distribution of $Y=X_1-X_2$.
(i) Superimpose a Laplace distribution over a density histogram of the $Y$ values. (Hint: The R function curve() can be used to superimpose the Laplace distribution over the density histogram.)
(ii) Is the mean of $Y$ within 0.02 of the theoretical mean?
(iii) Is the variance of $Y$ within $2 \%$ of the theoretical variance?

Manik Pulyani
Manik Pulyani
Numerade Educator
01:35

Problem 8

Let $X$ be a normal random variable $N(\mu=7, \sigma=3)$. Calculate $\mathbb{P}(X>7.1)$. Find the value of $k$ such that $\mathbb{P}(X<k)=0.8$.

Bryan Meares
Bryan Meares
Numerade Educator
02:44

Problem 9

Let $X$ be a normal random variable $N(\mu=3, \sigma=\sqrt{0.5})$. Calculate $\mathbb{P}(X>3.5)$.

Harsh Gadhiya
Harsh Gadhiya
Numerade Educator
01:18

Problem 10

Let $X$ be a gamma random variable $\Gamma(\alpha=2, \lambda=6)$. Find the value $a$ such that $\mathbb{P}(X<a)=0.95$.

Wendi Zhao
Wendi Zhao
Numerade Educator
01:53

Problem 11

If $X$ is the number of 3 's that appear when 60 dice are tossed, what is the $E\left(X^2\right)$ ?

Lucas Finney
Lucas Finney
Numerade Educator
View

Problem 12

An importing company knows that $80 \%$ of its imported Chinese socks are suitable for sale. If a sample of 60 pairs is drawn at random, find the probability that a percentage between $70 \%$ and $90 \%$ (inclusive) of the sample is suitable for sale.

James Kiss
James Kiss
Numerade Educator
01:43

Problem 13

It is known that $3 \%$ of the seeds of a certain variety of tomato do not germinate. The seeds are sold in individual boxes that contain 20 seeds per box with the guarantee that at least 18 seeds will germinate. Find the probability that a randomly selected box does not fulfill the aforementioned requirement.

AG
Ankit Gupta
Numerade Educator
12:03

Problem 14

Traffic volume is an important factor for determining the most cost effective method to surface a road. Suppose that the average number of vehicles passing a certain point on a road is 2 every 30 seconds.
(a) Find the probability that more than 3 cars will pass the point in 30 seconds.
(b) What is the probability that more than 10 cars pass the point in 3 minutes?

Evelyn Cunningham
Evelyn Cunningham
Numerade Educator
01:04

Problem 15

The retaining wall of a dam will break if it is subjected to the pressure of two floods. If the average number of floods in a century is two, find the probability that the retaining wall lasts more than 20 years.

Amany Waheeb
Amany Waheeb
Numerade Educator
04:21

Problem 16

A particular competition shooter hits his targets $70 \%$ of the time with any pistol. To prepare for shooting competitions, this individual practices with a pistol that holds 5 bullets on Tuesday, Thursday, and Saturday, and a pistol that holds 7 bullets the other days. If he fires at targets until the pistol is empty, find the probability that he hits only one target out of the bullets shot in the first round of bullets in the pistol he is carrying that day. In this case, what is the probability that he used the pistol with 7 bullets?

Sam Sohn
Sam Sohn
Numerade Educator
01:51

Problem 17

A binomial, $\operatorname{Bin}(n, \pi)$, distribution can be approximated by a normal distribution, $N(n \pi, \sqrt{n \pi(1-\pi)})$, when $n \pi>10$ and $n(1-\pi)>10$. The Poisson distribution can also be approximated by a normal distribution $N(\lambda, \sqrt{\lambda})$ if $\lambda>10$. Consider a sequence from 7 to 25 of a variable $X$ (binomial or Poisson) and show that for $n=80$, $\pi=0.2$, and $\lambda=16$ the aforementioned approximations are appropriate. The normal approximation to a discrete distribution can be improved by adding 0.5 to the normal random variable when finding the area to the left of said random variable. Specifically, create a table showing $\mathbb{P}(X \leq x)$ for the range of $X$ for the three distributions and a graph showing the density of the normal distribution with vertical lines at $X-.1$ and $X+.1$ showing $\mathbb{P}(X=x)$ for the binomial and Poisson distributions, respectively.

Christopher Stanley
Christopher Stanley
Numerade Educator
03:13

Problem 18

Verify that if $k / N$ is small $(\leq 0.1)$ and $N=m+n$ is large, a hypergeometric distribution, $\operatorname{Hyper}(m, n, k)$, can be adequately approximated by a $\operatorname{Bin}(n=k, \pi=m / N)$ distribution. Compute the probabilities for each distribution using the values $n=20, m=300, k=10$. Show the numerical results to three decimal places as well as a graph depicting the probabilities of the hypergeometric distribution with a vertical line and the probabilities of the binomial distribution in the same plot with an open circle.

Amany Waheeb
Amany Waheeb
Numerade Educator
01:15

Problem 19

In 1935, Fisher described the following experiment in his book, Design of Experiments: A friend of Fisher's said that when she drank tea with milk, she was able to determine if the tea was poured first or if the milk was poured first. Find the probability that Fisher's colleague guesses 3 cups in which milk has been added before tea, given that in 4 out of 8 cups, milk has been added before tea.

Hoan Nguyen
Hoan Nguyen
Numerade Educator
02:00

Problem 20

Consider the function $g(x)=(x-a)^2$, where $a$ is a constant and $E\left[(X-a)^2\right]$ is finite. Find $a$ so that $E\left[(X-a)^2\right]$ is minimized.

Amany Waheeb
Amany Waheeb
Numerade Educator
03:43

Problem 21

Suppose the percentage of drinks sold from a vending machine are $80 \%$ and $20 \%$ for soft drinks and bottled water, respectively.
(a) What is the probability that on a randomly selected day, the first soft drink is the fourth drink sold?
(b) Find the probability that exactly 1 out of 10 drinks sold is a soft drink.
(c) Find the probability that the fifth soft drink is the seventh drink sold.
(d) Verify empirically that $\mathbb{P}(\operatorname{Bin}(n, \pi) \leq r-1)=1-\mathbb{P}(N B(r, \pi) \leq(n-r))$, with $n=10, \pi=0.8$, and $r=4$.

Sheryl Ezze
Sheryl Ezze
Numerade Educator
20:53

Problem 22

The hardness of a particular type of sheet metal sold by a local manufacturer has a normal distribution with a mean of 60 micra and a standard deviation of 2 micra.
(a) This type of sheet metal is said to conform to specification provided its hardness measure is between 57 and 65 micra. What percent of the manufacturer's sheet metal can be expected to fall within the specification?
(b) A building contractor agrees to purchase metal from the local metal manufacturer at a premium price provided four out of four randomly selected pieces of metal test between 57 and 65 micra. What is the probability the building contractor will purchase metal from the local manufacturer and pay a premium price?
(c) If an acceptable sheet of metal is one whose hardness is not more than $c$ units away from the mean, find $c$ such that $97 \%$ of the sheets are acceptable.
(d) Find the probability that at least 10 out of 20 sheets have a hardness greater than 60.

Wendy Davidson
Wendy Davidson
Numerade Educator
03:08

Problem 23

The weekly production of a banana plantation can be modeled with a normal random variable that has a mean of 5 tons and a standard deviation of 2 tons.
(a) Calculate the mean number of weeks in which the production is greater than the third quartile.
(b) Find the probability that, in at most 1 out of the 8 randomly chosen weeks, the production has been less than 3 tons.
(c) Find the probability that at least 3 weeks are needed to obtain a production greater than 10 tons.

Amany Waheeb
Amany Waheeb
Numerade Educator
02:16

Problem 24

The lifetime of a certain engine follows a normal distribution with mean and standard deviation of 10 and 3.5 years, respectively. The manufacturer replaces all catastrophic engine failures within the guarantee period free of charge. If the manufacturer is willing to replace no more than $4 \%$ of the defective engines, what is the largest guarantee period the manufacturer should advertise?

Raymond Matshanda
Raymond Matshanda
Numerade Educator
01:25

Problem 25

A bank has 50 deposit accounts with $€ 25,000$ each. The probability of having to close a deposit account and then refund the money in a given day is 0.01 . If account closings are independent events, how much money must the bank have available to guarantee it can refund all closed accounts in a given day with probability greater than 0.95 ?

Christopher Stanley
Christopher Stanley
Numerade Educator
07:27

Problem 26

The vendor in charge of servicing coffee dispensers is adjusting the one located in the department of statistics. To maximize profit, adjustments are made so that the average quantity of liquid dispensed per serving is 200 milliliters per cup. Suppose the amount of liquid per cup follows a normal distribution and $5.5 \%$ of the cups contain more than 224 milliliters.
(a) Find the probability that a given cup contains between 176 and 224 milliliters.
(b) If the machine can hold 20 liters of liquid, find the probability that the machine must be replenished before dispensing 99 cups.
(c) If 6 random samples of 5 cups are drawn, what is the probability that the sample mean is greater than 210 milliliters in at least 2 of them?

Adam Harper
Adam Harper
Numerade Educator
View

Problem 27

The mean number of calls a tow truck company receives during a day is 5 per hour. Find the probability that a tow truck is requested more than 4 times per hour in a given hour. What is the probability the company waits for less than 1 hour before the tow truck is requested 3 times?

Sheryl Ezze
Sheryl Ezze
Numerade Educator
04:20

Problem 28

The pill weight for a particular type of vitamin follows a normal distribution with a mean of 0.6 grams and a standard deviation of 0.015 grams. It is known that a particular therapy consisting of a box of vitamins with 125 pills is not effective if more than $20 \%$ of the pills are under 0.58 grams.
(a) Find the probability that the therapy with a box of vitamins is not effective.
(b) A supplement manufacturer sells vitamin bottles containing 125 vitamins per bottle with 50 bottles per box with a guarantee that at least 47 bottles per box weigh more than 74.7 grams. Find the probability that a randomly chosen box does does not meet the guaranteed weight.

Nick Johnson
Nick Johnson
Numerade Educator
05:13

Problem 29

A canning industry uses tins with weight equal to 20 grams. The tin is placed on a scale and filled with red peppers until the scale shows the weight $\mu$. Then, the tin contains $Y$ grams of peppers. If the scale is subject to a random error $X \sim N(0, \sigma=10)$,
(a) How is $Y$ related to $X$ and $\mu$ ?
(b) What is the probability distribution of the random variable $Y$ ?
(c) Calculate the value $\mu$ such that $98 \%$ of the tins contain at least 400 grams of peppers.
(d) Repeat the exercise assuming the weight of the tins to be a normal random variable $W \sim N(20, \sigma=5)$.

Gus Steppen
Gus Steppen
Numerade Educator
07:52

Problem 30

In the printing section of a plastics company, a machine receives on average 6 buckets per minute to be painted. The machine has been out of service for 90 seconds due to a power failure.
(a) Find the probability that more than 8 buckets remain unpainted.
(b) Find the probability that the first bucket, after the electricity is restored, arrives before 10 seconds have passed.

Saeeda Aman
Saeeda Aman
Numerade Educator
View

Problem 31

Give a general expression to calculate the quantiles of a Weibull random variable.

Rashmi Sinha
Rashmi Sinha
Numerade Educator
08:24

Problem 32

A used-car salesman offers a guarantee period of one year for his cars. He knows that the distribution of the elapsed time until the first breakdown occurs follows a Weibull distribution, Weib $(3,25)$. If the salesman expects to sell 50 cars per year, and the repair cost per car is on average 800 dollars, what is the mean cost of the guarantee?

Barsha Rana
Barsha Rana
Numerade Educator
01:07

Problem 33

Let $X$ be a random variable with probability density function
$$
f(x)=3\left(\frac{1}{x}\right)^4, \quad x \geq 1 .
$$
(a) Fix the seed at 98 (set. seed (98)), and generate a random sample of size $n=10000$ from $X$ 's distribution. Compute the mean, variance, and coefficient of skewness for the random sample.
(b) Obtain the theoretical mean, variance, and coefficient of skewness of $X$.
(c) How close are the estimates in (a) to the theoretical values in (b)?

Joshua Sieverding
Joshua Sieverding
Numerade Educator
03:41

Problem 34

Let $X$ be a random variable with probability density function
$$
f(x)=\theta\left(\frac{1}{x}\right)^{\theta+1}, \quad x \geq 1, \theta>1 .
$$
(a) Verify that the area under $f(x)$ is 1.
(b) Fix the seed at 42 (set, seed (42)), and generate 10000 realizations of $X$ with $\theta=2$. What are the mean and variance of the random sample?
(c) Calculate the theoretical mean and variance of $X$.
(d) How close are the estimates in (b) to the theoretical values in (c)?
(e) Find the cumulative density function.
(f) What is $\mathbb{P}(X \leq 3)$ ?

Victor Salazar
Victor Salazar
Numerade Educator
01:07

Problem 35

Let $X$ be a random variable with probability density function
$$
f(x)=\frac{4}{3} x\left(2-x^2\right), \quad 0 \leq x \leq 1 .
$$
(a) Verify that the area under $f(x)$ is 1.
(b) Fix the seed at 13 (set. seed(13)), and generate 10000 realizations of $X$. What are the mean and variance of the random sample?
(c) Calculate the theoretical mean and variance of $X$.
(d) How close are the estimates in (b) to the theoretical values in (c)?
(e) Find the cumulative density function.
(f) What is $\mathbb{P}(X>.75)$ ?

Joshua Sieverding
Joshua Sieverding
Numerade Educator
01:07

Problem 36

Let $X$ be a random variable with probability density function
$$
f(x)=(\theta+1)(1-x)^\theta, \quad 0 \leq x \leq 1, \theta>0 .
$$
(a) Verify that the area under $f(x)$ is 1 .
(b) Fix the seed at $80($ set. seed (80)), and generate 10000 realizations of $X$ with $\theta=2$. What are the mean and variance of the random sample?
(c) Calculate the theoretical mean and variance of $X$.
(d) How close are the estimates in (b) to the theoretical values in (c)?
(e) Find the cumulative density function.
(f) What is $\mathbb{P}(X \leq .25)$ ?

Joshua Sieverding
Joshua Sieverding
Numerade Educator
01:07

Problem 37

Let $X$ be a random variable with probability density function
$$
f(x)=3 \pi \theta x^2 e^{-\theta \pi x^3}, \quad x \geq 0 .
$$
(a) Verify that the area under $f(x)$ is 1 .
(b) Fix the seed at 201 (set.seed(201)), and generate 10000 realizations of $X$ with $\theta=5$. What are the mean and variance of the random sample?
(c) Calculate the theoretical mean and variance of $X$.
(d) How close are the estimates in (b) to the theoretical values in (c)?
(e) Find the cumulative density function.
(f) What is $\mathbb{P}(X>1)$ ?

Joshua Sieverding
Joshua Sieverding
Numerade Educator
12:10

Problem 38

A copper wire manufacturer produces conductor cables. These cables are of practical use if their resistance lies between 0.10 and 0.13 ohms per meter. The resistance of the cables follows a normal distribution, where $50 \%$ of the cables have resistance under 0.11 ohms and $10 \%$ have resistance over 0.13 ohms.
(a) Determine the mean and the standard deviation for cable resistance.
(b) Find the probability that a randomly chosen cable can be used.
(c) Find the probability that at least 3 out of 5 randomly chosen cables can be used.

Barsha Rana
Barsha Rana
Numerade Educator
01:55

Problem 39

Consider the random variable $X \sim W e i b(\alpha, \beta)$.
(a) Find the cdf for $X$.
(b) Use (4.18) and verify that for $X \sim W e i b(\alpha, \beta)$, the hazard function is given by
$$
h(t)=\frac{\alpha t^{\alpha-1}}{\beta^\alpha}
$$

Michelle Z.
Michelle Z.
Numerade Educator
01:45

Problem 40

If $X \sim \operatorname{Bin}(n, \pi)$, derive the moment generating function of $X$ and use it to derive the mean and variance of $X$. The binomial pdf can be found on page 117 .

Hast Aggarwal
Hast Aggarwal
Numerade Educator
02:05

Problem 41

If $X \sim \operatorname{Bin}(n, \pi)$, use the binomial expansion to find the mean and variance of $X$. To find the variance, use the second factorial moment $E[X(X-1)]$ and note that $\frac{x}{x !}=\frac{1}{(x-1) !}$ when $x>1$.

Victor Salazar
Victor Salazar
Numerade Educator
06:50

Problem 42

The speed of a randomly chosen gas molecule in a certain volume of gas is a random variable, $V$, with probability density function
$$
f(v)=\sqrt{\frac{2}{\pi}}\left(\frac{M}{R T}\right)^{\frac{3}{2}} v^2 e^{-\frac{M v^2}{2 R T}} \quad \text { for } v \geq 0
$$
where $R$ is the gas constant (=8.3145 J/mol $\cdot \mathrm{K}$ ), $M$ is the molecular weight of the gas, and $T$ is the absolute temperature measured in degrees Kelvin.
(Hints:
$$
\left.\int_0^{\infty} x^k e^{-x^2} d x=\frac{1}{2} \Gamma\left(\frac{k+1}{2}\right) \quad \Gamma(\alpha+1)=\alpha \Gamma(\alpha) \quad \Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}\right)
$$
(a) Derive a general expression for the average speed of a gas molecule.
(b) If $1 \mathrm{~J}=1 \mathrm{~kg} \cdot \mathrm{m}^2 / \mathrm{s}^2$, what are the units for the answer in part (a)?
(c) Kinetic energy for a molecule is $E_k=\frac{M \nu^2}{2}$. Derive a general expression for the average kinetic energy of a molecule.
(d) The weight of hydrogen is $1.008 \mathrm{~s} / \mathrm{mol}$. Note that there are $6.0221415 \times 10^{23}$ molecules in 1 mole. Find the average speed of a hydrogen molecule at $300^{\circ} \mathrm{K}$ using the result from part (a).
(e) Use numerical integration to verify the result from part (d).
(f) Show the probability density functions for the speeds of hydrogen, helium, and oxygen on a single graph. The molecular weights for these elements are $1.008 \mathrm{~g} / \mathrm{mol}$, $4.003 \mathrm{~g} / \mathrm{mol}$, and $16.00 \mathrm{~g} / \mathrm{mol}$, respectively.

Vikash Ranjan
Vikash Ranjan
Numerade Educator
00:41

Problem 43

Consider the equilateral triangle $A B C$ with side $l$. Given a randomly chosen point $R$ in the triangle, calculate the cumulative and the probability density functions for the distance from $R$ to the side $B C$. Construct a graph of the cumulative density function for different values of $l$.
(DIAGRAM CAN'T COPY)

Victor Salazar
Victor Salazar
Numerade Educator
01:33

Problem 44

In Pamplona, Spain, a tombola organizes different raffles during the festivals. In each raffle, only 2 tickets out of $n$ win a prize. The tickets are sold consecutively, and the prize is immediately announced when one person wins. Two friends have decided to take part in one of the raffles in the following way: One of them buys the first ticket on sale, and the other one buys the first ticket after the first prize has been announced. Derive the probability that each of them wins a prize. If there are $m$ raffles during the night in which the two friends participate, what is the probability that each of them wins more than one prize?

Aman Gupta
Aman Gupta
Numerade Educator

Problem 45

Example 4.4 on page 122 introduced the World Cup Soccer data stored in the data frame Soccer. The observed and expected number of goals for a 90 minute game were computed. To verify that the Poisson rate $\lambda$ is constant, compute the observed and expected number of goals with the time intervals $45,15,10,5$, and 1 minute(s). Compute the means and variances for both the observed and expected counts in each time interval. Based on the results, is criterion (3) of the Poisson process on page 120 satisfied? (Note: See the code at the end of the Chapter 4 script for ideas on how to do this.)

Check back soon!