Graded: 3.2 (see normalPlot), 3.4, 3.18 (use qqnormsim from lab 3), 3.22, 3.38, 3.42

3.2

library('DATA606')
## 
## 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
normalPlot(0,1,c(-1.13,4))

#0.871
normalPlot(0,1,c(-4,0.18))

#0.571
normalPlot(0,1,c(8,10))

#0
normalPlot(0,1,c(-0.5,0.5))

#0.383

3.4

# 1. (a) Write down the short-hand for these two normal distributions.
# N(ū=4313, σ=583)
# N(ū=5261, σ=807)

# 2 (b) What are the Z-scores for Leo’s and Mary’s finishing times? What do these Z-scores tell you?

#men
z1 = (4948 - 4313)/583
#women
z2 = (5513 - 5261)/807

z1
## [1] 1.089194
z2
## [1] 0.3122677

what this is telling me is that the women observation did better, a time closer to the mean.

  1. Did Leo or Mary rank better in their respective groups? Explain your reasoning.

Mary ranked better than Leo, she had a result closer to the mean and the results that fared better are below the mean, or closer to the left edge as possible.

  1. What percent of the triathletes did Leo finish faster than in his group? Leo finished faster then 13.8% of the athletes
normalPlot(4313,583, c(0,4948))

1-0.862
## [1] 0.138
  1. What percent of the triathletes did Mary finish faster than in her group? Mary finished faster than the 37.7% of the athletes.
normalPlot(5261,807, c(0,5513))

1-0.623
## [1] 0.377
  1. If the distributions of finishing times are not nearly normal, would your answers to parts
      1. change? Explain your reasoning.

we can calculate the z scores for distributions that are not normal but we should be able to check the actual models to answer the other answers, so we don’t know those.

3.18

qqnormsim(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))

(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.

normalPlot(61.52, 4.58, c(54, 73))

it follows the rule as 99.7% of the data is actually within 3 standard deviation of the mean.

  1. Do these data appear to follow a normal distribution? Explain your reasoning using the graphs provided below.

yeah, it follows a normal distribution, as a big amount of samples are close to the line in the axis plot.

3.22

1-(0.98)^10
## [1] 0.1829272
(0.98)^100
## [1] 0.1326196
mean =  1/0.02
#std dev  is 2
mean =  1/0.05
mean
## [1] 20
#std dev  is 5
  1. it lowers the mean and spreads out the standard deviation.

3.38

  1. 38.2%
dbinom(2, size=3, prob=0.51) 
## [1] 0.382347
(0.49 * 0.51 * 0.51) + (0.51 * 0.51 * 0.49) + (0.51 * 0.49 * 0.51)
## [1] 0.382347
  1. it will be more tedious because the combinations of the gender of the kids will create multiple combinations and it’ll just be a longer calculation.

3.42

(0.85)^7 + (0.15)^3
## [1] 0.3239521