Area under the curve, Part I. (4.1, p. 142) What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region? Be sure to draw a graph.
require(fastGraph)
## Loading required package: fastGraph
pnorm(-1.35,mean=0,sd=1)
## [1] 0.08850799
shadeDist(-1.35)
pnorm(1.48,mean=0,sd=1,,lower.tail=FALSE)
## [1] 0.06943662
shadeDist(1.48,lower.tail = FALSE)
pnorm(c(-0.4,1.5),mean=0,sd=1)
## [1] 0.3445783 0.9331928
#Answer: The middle area is 0.9331928-0.3445783=0.5886145
shadeDist(c(-0.4,1.5),lower.tail = FALSE)
pnorm(c(-2,2),0,1)
## [1] 0.02275013 0.97724987
# Answer:The area is 1-0.97724987+0.02275013=0.04550026
shadeDist(c(-2,2),lower.tail = TRUE)
Triathlon times, Part I a) Write down the short-hand for these two normal distributions.
Answer:
\(N(\mu=4313, \sigma=583)\) for man \(N(\mu=5261, \sigma=807)\) for Woman
Answer:
Leo’s Z-scores: (4948-4313)/583=1.089194 Mary’s Z-scores: (5513-5261)/807=0.3122677
Leo is 1.089 standard deviation above the mean and Mary is 0.312 standard deviation of the mean, which mean Leo perform better than Mary.
Answer: They all do better than the average because their z score is positive, but Leo’s z score is greater than Mary, so he do better than Mary.
pnorm(4948,4313,583,lower.tail = FALSE)
## [1] 0.1380342
pnorm(5513,5261,807,lower.tail = FALSE)
## [1] 0.3774186
Answer:
If the data are not nearly normal, the Z score of Leo and Mary will not change, but the answer of their probability will change because z score cannot use to calculate their probability. The result will be inaccurate if the data is not normal distribution.
Heights of female college students Below are heights of 25 female college students.
\[ \stackrel{1}{54}, \stackrel{2}{55}, \stackrel{3}{56}, \stackrel{4}{56}, \stackrel{5}{57}, \stackrel{6}{58}, \stackrel{7}{58}, \stackrel{8}{59}, \stackrel{9}{60}, \stackrel{10}{60}, \stackrel{11}{60}, \stackrel{12}{61}, \stackrel{13}{61}, \stackrel{14}{62}, \stackrel{15}{62}, \stackrel{16}{63}, \stackrel{17}{63}, \stackrel{18}{63}, \stackrel{19}{64}, \stackrel{20}{65}, \stackrel{21}{65}, \stackrel{22}{67}, \stackrel{23}{67}, \stackrel{24}{69}, \stackrel{25}{73} \]
heights <- c(54, 55, 56, 56, 57, 58, 58, 59, 60, 60, 60, 61, 61, 62, 62, 63, 63, 63, 64, 65, 65, 67, 67, 69, 73)
summary(heights)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 54.00 58.00 61.00 61.52 64.00 73.00
sd(heights)
## [1] 4.583667
#Probability for falling within 1 standard deviation
pnorm(61.52+4.58,mean=61.52,sd=4.58)
## [1] 0.8413447
#Probability for falling within 2 standard deviation
pnorm(61.52+2*4.58,mean=61.52,sd=4.58)
## [1] 0.9772499
#Probability for falling within 3 standard deviation
pnorm(61.52+3*4.58,mean=61.52,sd=4.58)
## [1] 0.9986501
hist(heights)
qqnorm(heights)
qqline(heights)
qqnormsim(heights)
Answer: The probability of the first, second, and third standard deviation is 84.13%, 97.72% and 99.87%, respectively. It doesn’t follow the 68%, 95% and 99.7% rule.
Answer: The histogram and QQ-plot shows the data follow a normal distribution because those points seems to follow the line, except some deviation on both ends.
Defective rate. (4.14, p. 148) A machine that produces a special type of transistor (a component of computers) has a 2% defective rate. The production is considered a random process where each transistor is independent of the others.
p=0.98^9*0.02=0.01667496
p1<-0.98^9*0.02
p1
## [1] 0.01667496
0.98^100
## [1] 0.1326196
#expect to be produced before the first with a defect
1/0.02
## [1] 50
#standard deviation
sqrt((1-0.02)/0.02^2)
## [1] 49.49747
#how many transistors would you expect to be produced with this machine before the first with a defect
1/0.05
## [1] 20
#standard deviation
sqrt((1-0.05)/0.05^2)
## [1] 19.49359
Answer: Increasing the probability of event will decreases the mean and standard deviation.
Male children. While it is often assumed that the probabilities of having a boy or a girl are the same, the actual probability of having a boy is slightly higher at 0.51. Suppose a couple plans to have 3 kids.
factorial(3)/(factorial(2)*factorial(1))*0.51^2*(1-0.51)
## [1] 0.382347
We have three chirldren A, B and C, the combination of two of them are boys as follows
BBG<-0.51*0.51*0.49
BGB<-0.51*0.49*0.51
GBB<-0.49*0.51*0.51
sum(BBG,BGB,GBB)
## [1] 0.382347
factorial(8)/(factorial(3)*factorial(5))
## [1] 56
Answer: It is very tedious because we have 56 combinations to caculate the posiblility.
Serving in volleyball. (4.30, p. 162) A not-so-skilled volleyball player has a 15% chance of making the serve, which involves hitting the ball so it passes over the net on a trajectory such that it will land in the opposing team’s court. Suppose that her serves are independent of each other.
choose(9,2)*0.15^3*0.85^7
## [1] 0.03895012
Answer: Everyone serrves is independtly, so the probability of her 10th serve will be sucessful is 15%
Answer: Part (a) calculate the third successful serve base on the 10th try, so it have fix number of trials, it is negative binomial distribution. Part (c) only discuss the third serve, which is independent.