What percent of a standard normal distribution \(N(\mu=0, \sigma=1)\) is found in each region? Be sure to draw a graph.
(a) \(Z < -1.35\)
## Loading required package: shiny
## Loading required package: openintro
## Please visit openintro.org for free statistics materials
##
## Attaching package: 'openintro'
## The following objects are masked from 'package:datasets':
##
## cars, trees
## Loading required package: OIdata
## Loading required package: RCurl
## Loading required package: bitops
## Loading required package: maps
## Loading required package: ggplot2
##
## Attaching package: 'ggplot2'
## The following object is masked from 'package:openintro':
##
## diamonds
## Loading required package: markdown
##
## Welcome to CUNY DATA606 Statistics and Probability for Data Analytics
## This package is designed to support this course. The text book used
## is OpenIntro Statistics, 3rd Edition. You can read this by typing
## vignette('os3') or visit www.OpenIntro.org.
##
## The getLabs() function will return a list of the labs available.
##
## The demo(package='DATA606') will list the demos that are available.
##
## Attaching package: 'DATA606'
## The following object is masked from 'package:utils':
##
## demo
## [1] 0.08850799
(b) \(Z > 1.48\)
## [1] 0.06943662
(c) \(-0.4 < Z < 1.5\)
## [1] 0.5886145
(d) \(|Z| > 2\)
## [1] 0.04550026
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:
Remember: a better performance corresponds to a faster finish.
(a) Write down the short-hand for these two normal distributions.
Men’s finishing time at ages 30-34: \(M\sim N(\mu=4313, \sigma=583)\)
Women’s finishing time at ages 25-29: \(W\sim N(\mu=5261, \sigma=807)\)
(b) What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?
Leo’s Z-score = 1.089194. Leo is 1.089 of the standard deviation away from the mean.
## [1] 1.089194Mary’s Z-score = 0.3122677. Mary is 0.3123 of the standard deviation away from the mean.
## [1] 0.3122677Z-score allows us to compare obervations from different groups which having different means and standard deviations.
(c) Did Leo or Mary rank better in their respective groups? Explain your reasoning.
(d) What percent of the triathletes did Leo finish faster than in his group?
Leo’s ranking percentile is 13.80%. He is faster than 13.80% men in his group.
## [1] 0.1380342(e) What percent of the triathletes did Mary finish faster than in her group?
Mary’s ranking percentile is 37.74%. She is faster than 37.74% women in her group.
## [1] 0.3774186(f) If the distributions of finishing times are not nearly normal, would your answers to parts (b) - (e) change? Explain your reasoning.
The answer to parts (b) and (c) will be the same as z-score represents the corresponding percentile score of the targeted value to the group.
The answer to parts (d) and (e) will not be the same as they are not nearly normal and we would have to use other methods to calculate their percentile instead of using pnorm.
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} \]
hgt <- 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)
m <- 61.52
s <- 4.58(a) The mean height is 61.52 inches with a standard deviation of 4.58 inches. Use this information to determine if the heights approximately follow the 68-95-99.7% Rule.
The height information follows the 68-95-99.7% rule according to the calculations below.
## [1] 0.6826895
## [1] 0.9544997
## [1] 0.9973002(b) Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.
The histogram above shows that the height data is unimodal. It is not perfectly symmetric but nearly symmetric while slightly right-skewed. Mean appears to be approximately equal to median.
The qq plot and the normal probability plot shows that the data in the middle is slightly stepwise but close to the line with strong deviations at both tails.
The data follows a nearly normal distribution.
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?
Part (a) can be calculated by Geometric Distribution: $ (1-p)^{n-1}p$, or by the dgeom function:
#target: defect at 10th trial, i.e. p is the defect rate = 0.02, n = 10.
p = 0.02
n = 10
(1-p)^(n-1)*p## [1] 0.01667496
## [1] 0.01667496The probability of getting the first defect transistor at the 10th trial is 1.667%
(b) What is the probability that the machine produces no defective transistors in a batch of 100?
The probability of getting 100 effective transistors is 13.26%.
## [1] 0.1326196(c) On average, how many transistors would you expect to be produced before the first with a defect? What is the standard deviation?
49 effective transistor to be produced before the first defective one at the 50th trial.
## [1] 50The standard deviation is 49.49747.
## [1] 49.49747(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?
19 effective transistor would be producted before the first defective one at the 20th trial.
## [1] 20The standard deviation is 19.49.
## [1] 19.49359(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?
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.
The probability of getting two boys among 3 kids is 38.23%.
## [1] 0.382347(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.
[B, B, G], [B, G, B], [G, B, B] while B stands for boy and G stands for girl.
The probability calculated below for part (b) matches with the answer in part (a).
## [1] 0.382347(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).
If we use the approach from part (b), we have to list out all scenarios and sum them up, which is more tedious and easily miss out some scenarios which may cause mistakes. Here in this situation, there are in total 56 scenarios. It may be possible to list them out, but it is easily to get wrong with the tedious steps.
## [1] 56A 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?
3rd successful serve on the 10th try matches with the negative binomial distribution:
## [1] 0.03895012The desired probability is 3.895%.
(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?
By assumption, if we look at the one serve solely under the independence, the probability of success is always 15%.
The situation in part (a) is asking for the probability of getting her 3rd success at the 10th trial, which implies that all 10 trials are not yet occurred, therefore we need to calculate the probability for all the scenarios that matches with the requirement.
However, although part (b) seems to have the same situation as part (a), the first 9 trials of part (b) is already happened, which are facts and should not affect the 10th trial. Therefore the answer in part (b) is 15%.