Question 1

1.a

# i.    n=10?
pnorm(10,25.3,2.8)
## [1] 2.323872e-08
# ii.   n=25?
pnorm(25,25.3,2.8)
## [1] 0.4573378
# iii.  n=50?
pnorm(50,25.3,2.8)
## [1] 1

1.b

#The probability increased as n increased. For n=10, the probability was very small, while when n was sufficiently large the probability was 1. The distribution is normal as n increases.

1.c

Question 2

2.a - What is the mean of X_i?

np = 100*.05
np
## [1] 5

2.b - What is the standard deviation X_i?

sqrt(np*(1-.05))
## [1] 2.179449

2.c - What is the mean of X_bar?

np2 = 30*.05
np2
## [1] 1.5

2.d - What is the standard deviation of X_bar?

sqrt(np2*(1-.05))
## [1] 1.193734

2.e - What is the probability Pr(X_i≤4)?

pbinom(4,100,.05)
## [1] 0.4359813

2.f - What is the probability Pr(X_bar≤ 4)?

pbinom(4,30,.05)
## [1] 0.9843645


Complete R Code

# Question 1

## 1.a
#What is the probability that the average of the n observations is less than 25.3 when … 
# i.    n=10?
pnorm(10,25.3,2.8)
# ii.   n=25?
pnorm(25,25.3,2.8)
# iii.  n=50?
pnorm(50,25.3,2.8)

## 1.b
# Comment on anything you notices about Pr(X_bar < 25.3) as n is increased
"The probability increased as n increased. For n=10, the probability was very small, while when n was sufficiently large the probability was 1. The distribution is normal as n increases."

## 1.c
# Using R, plot on the same graph the pdf of X_bar over the range X_bar ∈(24,27) for the three different sample sizes n.  Make the plots three different colors.  Copy and paste the plot into a Word document.  
curve(dnorm(x,25.3,2.8),from=24,to=27,n=10,col="blue",main="PDF's of n=10,25,50",xlab="x",ylab="F(x)")
curve(dnorm(x,25.3,2.8),from=24,to=27,n=25,col="green",add=TRUE)
curve(dnorm(x,25.3,2.8),from=24,to=27,n=50,col="red",add=TRUE)

# Question 2
# A sample of n = 30 observations is to be drawn from a Binomial (100,.05) distribution, i.e. each X_i~Bin(100,.05).  Assume the Central Limit Theorem holds.

## 2.a - What is the mean of X_i?
np = 100*.05
## 2.b - What is the standard deviation X_i?
sqrt(np*(1-.05))
## 2.c - What is the mean of X_bar?
np2 = 30*.05
## 2.d - What is the standard deviation of X_bar?
sqrt(np2*(1-.05))
## 2.e - What is the probability Pr(X_i≤4)?
pbinom(4,100,.05)
## 2.f - What is the probability Pr(X_bar≤ 4)?
pbinom(4,30,.05)