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
All probabilities are appromiate because bounds must be finite
a
normalPlot(bounds = c(-1.13,100))
b
normalPlot(bounds =c(-100, .18))
c
normalPlot(bounds =c(8,100))
d
normalPlot(bounds = c(-.5,.5))
a) Men: \[n(4313,\quad 583)\] Women: \[n(5261,\quad 807)\]
b) Leo: 1.0874786 Mary: 0.3122677
This reveals that Leo had the higher Z score
c) Leo’s Z score was higher, so Leo’s time was in a higher percentile than Mary’s for their respective groups, a negative for races.
d) 0.1380342
e) 0.3774186
f) All of these answers would change if the distrubtion were not normal. The median could be different from the mean, so beating the mean might not indicate a better score. The percentiles of course go totally out the window, as they are based on a normal distribution.
a) 1 SD lower bound: 56.94 upper bound: 66.1. 17 out of 25 observations fall in this range, which is exactly 68%. The 2 SD range is about 52 to 70, which only one observation falls outside, so the rule holds. This is too small a sample to test 3 SDs
b)
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)
qqnormsim(heights)
The data mostly follows a normal distrubtion, with some deviation towards the tails. The histogram bins are probably too large, but the QQ plot mostly follows a straight line. The data acutally hugs the line closer than most of the simulations
a) 0.016675
b) 0.1326196
c) Mean: 49
SD: 49.4974747
d) Mean: 19
SD: 19.4935887
e) Both will be decreased by apporximately the same amount when the probability of “success” is increased.
a) 0.382347
b) bbg + bgb + gbb = 0.382347
This matches part a
c) You would need to compute 56 terms (8 choose 3).
a)0.0389501
b)15 percent because the serves are independant
c) Part b is conditional on the player have made 2 out of 9 serves. Part a is the uncondiontal negative binomial distribution