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
# 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.
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.
normalPlot(4313,583, c(0,4948))
1-0.862
## [1] 0.138
normalPlot(5261,807, c(0,5513))
1-0.623
## [1] 0.377
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.
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.
yeah, it follows a normal distribution, as a big amount of samples are close to the line in the axis plot.
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
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
(0.85)^7 + (0.15)^3
## [1] 0.3239521