Question 1

Part A

A We need to find the probability of each set of observations that the average is less than 25.3

N=c(10,25,50)
S1=pnorm(25.3,24.5,2.8/sqrt(N))
print(S1)
## [1] 0.8168718 0.9234363 0.9783241

Part B

From what was observed, as N increased, the probability of the average being less than 25.3 increased. From 81.6% up to 97.8%

Part C

The pdf of each of the sample sizes

curve(dnorm(x,24.5,2.8/sqrt(10)),col="Blue",from = 24,to=27,
      main="PDF of N=10,25,50",ylab="Probability",xlab = "Average")
curve(dnorm(x,24.5,2.8/sqrt(25)),col="Red",add=TRUE)
curve(dnorm(x,24.5,2.8/sqrt(50)),col="Green",add=TRUE)

Question 2

Part A

We need to find the mean of Xi

n=100
p=0.05
M=(n*p)
print(M)
## [1] 5

Part B

We need to find the standard deviation of Xi

Sd=sqrt(n*p*(1-p))
print(Sd)
## [1] 2.179449

Part C

We need to find the mean of Bar X

n2=30
p=0.05
M2=(n2*p)
print(M2)
## [1] 1.5

Part D

We need to find the standard deviation of Bar X

Sd2=Sd/sqrt(n2)
print(Sd2)
## [1] 0.3979112

Part E

The probability Xi is Equal or less than 4

pbinom(4,100,0.05)
## [1] 0.4359813

Part F

The probability Bar X is Equal or less than 4

pnorm(4,M2,Sd2)
## [1] 1

Complete Code

#A
N=c(10,25,50)
S1=pnorm(25.3,24.5,2.8/sqrt(N))
print(S1)
#B
##The probability increrases as N Increases

#C
curve(dnorm(x,24.5,2.8/sqrt(10)),col="Blue",from = 24,to=27,
      main="PDF of N=10,25,50",ylab="Probability",xlab = "Average")
curve(dnorm(x,24.5,2.8/sqrt(25)),col="Red",add=TRUE)
curve(dnorm(x,24.5,2.8/sqrt(50)),col="Green",add=TRUE)

#2
#A
n=100
p=0.05
M=(n*p)
print(M)
#B
Sd=sqrt(n*p*(1-p))
print(Sd)
#c
n2=30
p=0.05
M2=(n2*p)
print(M2)
#D
Sd2=Sd/sqrt(n2)
print(Sd2)
#E
pbinom(4,100,0.05)
#F
pnorm(4,M2,Sd2)