Statistics 371: Binomial Distribution and Sampling Distributions, Assignments of Statistics

Solutions to exercises 5.3, 5.6, 5.16, 5.18, and 5.19 from statistics 371, fall 2002. It covers topics such as the binomial distribution, probability distributions of sample proportions, and normal approximations. R code snippets for calculating probabilities and generating graphs.

Typology: Assignments

Pre 2010

Uploaded on 09/02/2009

koofers-user-lpk
koofers-user-lpk 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Statistics 371 Brief Solutions #5 Fall 2002
1. Graph the binomial distribution for n= 10 and p= 0.1 with the command gbinom(10,0.1). Repeat this for p=
0.2,0.3, . . . , 0.9. [Please do not include these graphs with your assignment.]
(a) How does the center of the distribution change as pchanges?
Solution: The center moves to the right as pincreases. (The mean is 10p.)
(b) For which value of pis the distribution most strongly skewed right? left? most symmetric?
Solution: The distribution has the strongest skew right when pis small, 0.1 for this problem. The distribution has the
strongest skew left when pis large, 0.9 for this problem. The distribution is perfectly symmetric when p= 0.5.
(c) For which value of pis the standard deviation the largest?
Solution: The standard deviation is largest when the graph is most spread out around the mean. This happens when
p= 0.5. (You could use the formula to find σ=pnp(1 p)if you wanted to verify numerically what your eye tells
you.)
2. Graph the binomial distribution for n= 1 and p= 0.5 with the command gbinom(1,0.5). Repeat this for n=
2,4,8,16,32,64,128. [Please do not include these graphs with your assignment.]
(a) How does the center of the distribution change as nchanges?
Solution: The center increases as nincreases. (The mean is np.)
(b) Is this distribution skewed for any n?
Solution: With p= 0.5, the distribution is perfectly symmetric for all n.
(c) What is the smallest nfor which the distribution looks approximately normal? (There is no single correct answer.)
Solution: To my eye, when n= 16 I can see the bell shape appear, although it is somewhat apparent for smaller nand
even more apparent for larger n. Many different answers could be correct.
(d) What happens to the range of values for which the probabilities are large enough to be visible as nincreases?
Solution: The range of visible probabilities (the number of visible lines) increases as nincreases.
(e) What happens to the range of values for which the probabilities are large enough to be visible over nas nincreases?
Solution: The range of visible probabilities occupies a smaller and smaller portion of the entire possible range from 0 to
nas nincreases.
3. Graph the binomial distribution for n= 1 and p= 0.1 with the command gbinom(1,0.1). Repeat this for n=
2,4,8,16,32,64,128. [Please do not include these graphs with your assignment.] About how large does nneed to be
before the distribution looks nearly symmetric and approximately normal? Compare your answer here to the answer
in part (c) in the previous problem.
Solution: With n= 16, there is still a noticeable moderately strong skew. By the time n= 64, the skew has mostly
disappeared and the visible probabilities look to be fairly symmetric.
4. Exercise 5.3 (page 157).
Solution: In a forest, 25% of the white pines have blister rust. Four white pines are sampled and ˆpis the sample proportion
with blister rust. Find and plot the probability distribution of ˆp.
> prob <- dbinom(0:4, 4, 0.25)
> prob
[1] 0.31640625 0.42187500 0.21093750 0.04687500 0.00390625
> plot((0:4)/4, prob, type = "h")
Bret Larget October 7, 2002
pf3
pf4
pf5

Partial preview of the text

Download Statistics 371: Binomial Distribution and Sampling Distributions and more Assignments Statistics in PDF only on Docsity!

  1. Graph the binomial distribution for n = 10 and p = 0.1 with the command gbinom(10,0.1). Repeat this for p =
    1. 2 , 0. 3 ,... , 0 .9. [Please do not include these graphs with your assignment.]

(a) How does the center of the distribution change as p changes? Solution: The center moves to the right as p increases. (The mean is 10 p.) (b) For which value of p is the distribution most strongly skewed right? left? most symmetric? Solution: The distribution has the strongest skew right when p is small, 0.1 for this problem. The distribution has the strongest skew left when p is large, 0.9 for this problem. The distribution is perfectly symmetric when p = 0. 5. (c) For which value of p is the standard deviation the largest? Solution: The standard deviation is largest when the graph is most spread out around the mean. This happens when p = 0. 5. (You could use the formula to find σ =

np(1 − p) if you wanted to verify numerically what your eye tells you.)

  1. Graph the binomial distribution for n = 1 and p = 0.5 with the command gbinom(1,0.5). Repeat this for n = 2 , 4 , 8 , 16 , 32 , 64 , 128. [Please do not include these graphs with your assignment.]

(a) How does the center of the distribution change as n changes? Solution: The center increases as n increases. (The mean is np.) (b) Is this distribution skewed for any n? Solution: With p = 0. 5 , the distribution is perfectly symmetric for all n. (c) What is the smallest n for which the distribution looks approximately normal? (There is no single correct answer.)

Solution: To my eye, when n = 16 I can see the bell shape appear, although it is somewhat apparent for smaller n and even more apparent for larger n. Many different answers could be correct. (d) What happens to the range of values for which the probabilities are large enough to be visible as n increases? Solution: The range of visible probabilities (the number of visible lines) increases as n increases. (e) What happens to the range of values for which the probabilities are large enough to be visible over n as n increases?

Solution: The range of visible probabilities occupies a smaller and smaller portion of the entire possible range from 0 to n as n increases.

  1. Graph the binomial distribution for n = 1 and p = 0.1 with the command gbinom(1,0.1). Repeat this for n = 2 , 4 , 8 , 16 , 32 , 64 , 128. [Please do not include these graphs with your assignment.] About how large does n need to be before the distribution looks nearly symmetric and approximately normal? Compare your answer here to the answer in part (c) in the previous problem. Solution: With n = 16, there is still a noticeable moderately strong skew. By the time n = 64, the skew has mostly disappeared and the visible probabilities look to be fairly symmetric.
  2. Exercise 5.3 (page 157).

Solution: In a forest, 25% of the white pines have blister rust. Four white pines are sampled and pˆ is the sample proportion with blister rust. Find and plot the probability distribution of pˆ.

prob <- dbinom(0:4, 4, 0.25) prob

[1] 0.31640625 0.42187500 0.21093750 0.04687500 0.

plot((0:4)/4, prob, type = "h")

prob

  1. Exercise 5.6 (page 157).

Solution: In a population, 30% of the people have superior vision. The sample proportion with superior vision in a random sample of size five is pˆ. Find and plot the sampling distribution.

prob <- dbinom(0:5, 5, 0.3) prob

[1] 0.16807 0.36015 0.30870 0.13230 0.02835 0.

plot((0:5)/5, prob, type = "h")

Normal Distribution

mu = 145 , sigma = 22

Possible Values

Probability Density

P( 135 < X < 155 ) = 0.

P( X < 135 ) = 0.3247 P( X > 155 ) = 0.

(b) What proportion of sample means with n = 16 would be between 135 and 155? By hand,

Pr{ 135 < Y <¯ 155 } = Pr

Y¯ − 145

= Pr {− 0. 11 < Z < 0. 11 } = 0. 5438 − 0. 4562 = 0. 0876

Using R, we get this.

pnorm(155, 145, 22/sqrt(16)) - pnorm(135, 145, 22/sqrt(16)) [1] 0. Or we can graph it to see the answer. gnorm(145, 22/sqrt(16), prob = T, a = 135, b = 155)

Normal Distribution

mu = 145 , sigma = 5.

Possible Values

Probability Density

P( 135 < X < 155 ) = 0.

P( X < 135 ) = 0.0345 P( X > 155 ) = 0.

(c) What is Pr{ 135 < Y <¯ 155 } if n = 16? The answer is the same as in part (b). This is just a different way to ask the same question.

(d) What is Pr{ 135 < Y <¯ 155 } if n = 36? By hand,

Pr{ 135 < Y <¯ 155 } = Pr

Y¯ − 145

= Pr {− 0. 08 < Z < 0. 08 } = 0. 5319 − 0. 4681 = 0. 0638

Using R, we get this.

pnorm(155, 145, 22/sqrt(36)) - pnorm(135, 145, 22/sqrt(36)) [1] 0. Or we can graph it to see the answer. gnorm(145, 22/sqrt(36), prob = T, a = 135, b = 155)

115 with an SD about 25. The second mode is centered at 450 with an SD about 50. About 90% of the probability is in the first mode. You can reproduce the later graphs by changing the first argument from 1 to whichever sample size you desire.

Consider the graphs of these two populations.

  1. gmix(1,115,25,450,50,0.9)
  2. gmix(1,115,25,450,50,0.5)

(a) For each population, what is the smallest n in 5, 10 , 15 , 20 ,... for which the sampling distribution appears to be unimodal? (In a unimodal distribution, there is a point where the function is increasing to the left of the point and descreasing to the right of the point.) Solution: The first distribution is unimodal when n = 35. The second distribution is unimodal when n = 20. (b) For each population, what is the smallest n in 1, 2 , 4 , 8 , 16 ,... (doubling the sample size) for which you think that a normal approximation would be pretty good? (For example, when is the 90th percentiles pretty close to that for the normal curve? When is the area within one SE close to that of the normal curve?) Solution: The second distribution is approximately normal for n as small as 16. For the first, n would need to be at least 64, although there is still a noticeable skew, even when n is 128. (c) One distribution is approximately normal for a smaller n than the other. Make a guess as to why. What important characteristic distinguishes the two populations? Solution: The first distribution is more strongly skewed. This means that n needs to be much larger before the distribution becomes approximately normal.