3.2 Area under the curve, Part II. What percent of a standard normal distribution N(μ = 0; σ = 1) is found in each region? Be sure to draw a graph.
|
|
|
|
---|
Formula: Z = (x - mu) / sd, with N(sd = 1, mu = 0) => x = Z * 1 + 0 => x = Z
Z<--1.13
mu<-0
sd<-1
x<-Z*sd+mu
3.4 Triathlon times, Part I. In triathlons, it is common for racers to be placed into age and gender groups. Friends Leo and Mary both completed the Hermosa Beach Triathlon, where Leo competed in the Men, Ages 30 - 34 group while Mary competed in the Women, Ages 25 - 29 group. Leo completed the race in 1:22:28 (4948 seconds), while Mary completed the race in 1:31:53 (5513 seconds). Obviously Leo finished faster, but they are curious about how they did within their respective groups. Can you help them? Here is some information on the performance of their groups:
• The finishing times of the Men, Ages 30 - 34 group has a mean of 4313 seconds with a standard deviation of 583 seconds.
• The finishing times of the Women, Ages 25 - 29 group has a mean of 5261 seconds with a standard deviation of 807 seconds.
• The distributions of finishing times for both groups are approximately Normal.
Remember: a better performance corresponds to a faster finish.
Write down the short-hand for these two normal distributions.
What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?
Did Leo or Mary rank better in their respective groups? Explain your reasoning.
What percent of the triathletes did Leo finish faster than in his group?
What percent of the triathletes did Mary finish faster than in her group?
short.hand
Men | Women | |
---|---|---|
Age_group | 30-34 | 25-29 |
Race_completion_time | 4948 secs for Leo | 5513 secs for Mary |
Mean | 4313 | 5261 |
SD | 583 | 807 |
* | N(mean= 4313 , sd= 583 ) | N(mean= 5261 , sd= 807 ) |
z.scores
Z_scores | |
---|---|
formula | Z = (x - mu)/sd |
Leo | 1.09 |
Mary | 0.31 |
z.plot(x1)
z.plot(x2)
These Z-scores show how Leo and Mary did each compared to their respective groups.
Z_Mary < Z_Leo
<=> Mary’s z-score is closer to the her groups mean than Leo’s in respective to his group’s mean. Leo ranks better than Mary.
As Leo’s graph shows that his probablity is P(Z>1.09) = 0.1378 = 13.78%
. Leo finished faster than 13.8% of the runners in his group. We can also calculate it as following:
Leos_percentile |
---|
13.79 % |
P(Z>0.31) = 0.3783 = 37.83%
. Mary finished faster than 37.8% of the runners in her group. We can also calculate it as following:Marys_percentile |
---|
37.83 % |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
mean-sd < range < mean+sd
rule 68: multiplied = 1, mean-1*sd < range < mean+1*sd
rule 95: multiplied = 2, mean-2*sd < range < mean+2*sd
rule 99.7: multiplied = 3, mean-3*sd < range < mean+3*sd
## [1] "57 <range< 66 => count[ 57 : 66 ]/ 25 = 17/25 = 0.68 = 68 % equal to 68%"
## [1] "52 <range< 71 => count[ 52 : 71 ]/ 25 = 25/25 = 0.96 = 96 % close to 95%"
## [1] "48 <range< 75 => count[ 48 : 75 ]/ 25 = 25/25 = 1 = 100 % close to 99.7%"
The numbers are very close to 68-95-99.7% Rule, so the heights follow this rule.
Checking the graphs, the Bell curve and histogram look symmetric and unimodal, because it has one high peak and it’s in the middle. Meanwhile the qqplot or the normal prbability graph on the right side graph shows almost to be linear. Therefore, these indications can mean that the data looks almost as normal distribution in both graphs.
3.22 Defective rate. 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. (a) What is the probability that the 10th transistor produced is the first with a defect? (b) What is the probability that the machine produces no defective transistors in a batch of 100? (c) On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation? (d) Another machine that also produces transistors has a 5% defective rate where each transistor is produced independent of the others. On average how many transistors would you expect to be produced with this machine before the first with a defect? What is the standard deviation? (e) Based on your answers to parts (c) and (d), how does increasing the probability of an event affect the mean and standard deviation of the wait time until success?
Given: p = 2% = 0.02
## [1] "The geometric distribution formula for n trials: P(trials=n) = (1-p)^(n-1) * p. For this problem: P(trials=10) = 0.01667"
## [1] "P(non-defective in 100) = 0.13262"
## [1] "p(defect)=0.02 => mean = E(X) = 50 , sd = 49.4975"
## [1] "p1(defect)=0.05 => mean = E(X) = 20 , sd = 19.4936"
p | p1 |
---|---|
defect= 0.02 | defect1= 0.05 |
mean= 50 | mean1= 20 |
sd= 49.4975 | sd1= 19.4936 |
When the probability of the defect increases, the mean and the standard deviation or the wait time decrease.
p(defect) < p1(defect1) => mean < mean1 & sd < sd1
3.38 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. (a) Use the binomial model to calculate the probability that two of them will be boys. (b) Write out all possible orderings of 3 children, 2 of whom are boys. Use these scenarios to calculate the same probability from part (a) but using the addition rule for disjoint outcomes. Confirm that your answers from parts (a) and (b) match. (c) If we wanted to calculate the probability that a couple who plans to have 8 kids will have 3 boys, briefly describe why the approach from part (b) would be more tedious than the approach from part (a).
Given: n = 3, p = 0.51
Formula: (factorial(n) / (factorial(k) * factorial(n-k))) * p^k * (1-p)^(n-k)
## [1] "P(2 boys) = 0.382347"
pB<-0.51
pG<-0.49
p<-3*pB*pB*pG
## [1] "P(2 boys and 1 girl) = 0.382347"
## [1] "The result from (a) matches (b)."
a | b | |
---|---|---|
formula | (factorial(n)/(factorial(k)factorial(n-k))) p^k * (1-p)^(n-k) | (P(GBB) + P(BGB) + P(BBG))/(P(BBB)+P(BBG)+P(BGB)+P(BGG)+P(GBB)+P(GBG)+P(GGB)+P(GGG)) |
values | (factorial(8)/(factorial(3)factorial(8-3))) p^3 * (1-p)^(8-3) | 3 /(8 * P(B)^10 * P(G)^11) |
It’s obvious that with formula from (a) will most likely have less errors than in (b) and it will be faster to plug in values instead of spending time to find possibilities and combinations. Specially in this case of P(8 trials and 3 success) = n!/(k!(n−k))!=8!/(3!(8−3)!) = 56
combinations.
3.42 Serving in volleyball. 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. (a) What is the probability that on the 10th try she will make her 3rd successful serve? (b) Suppose she has made two successful serves in nine attempts. What is the probability that her 10th serve will be successful? (c) Even though parts (a) and (b) discuss the same scenario, the probabilities you calculated should be different. Can you explain the reason for this discrepancy?
Given: p = 0.15
kth trial binomial formula: (factorial(n-1) / (factorial(k-1) * factorial(n-k))) * p^k * (1-p)^(n-k)
## [1] "P(n=10, k=3) = 0.03895"
## [1] "Given per serve is: P(success of 10th) = 0.15"
Difference | |
---|---|
a | kth success on nth trial, not fixed values |
b | exact k success on (n-1)th trial and a probability for 1 serve |