177.7-163.8
## [1] 13.9
##c)Using a 95% confidence interval, the value should habe a z score between -2 and 2 to be usual
(180-171.1)/9.4
## [1] 0.9468085
(150-171.1)/9.4
## [1] -2.244681
\[ SE=\sigma /\sqrt { n } \]
\[ Margin Of Error = z *\sigma /\sqrt { n }\] ####g) True: Calculated below
r (89.11-80.31)/2
## [1] 4.4
{ r} zscore= (30.69-32)/(4.31/sqrt(36)) zscore p=pnorm(zscore) p ####If p is less than 10%, reject null ####Therefore there is evidence that the average age at which gifted children first count to 10 is leass than the general average of 32 months. ####c) P value is 3.44% ####It means that given the population mean is 32 months, we have 3.44% chance of getting a sample of 36 children with average less than the mean of 30.69 months ####d)
upper<-30.69 +1.65*4.31/sqrt(36)
upper
## [1] 31.87525
lower<-30.69 -1.65*4.31/sqrt(36)
lower
## [1] 29.50475
z=(118.2-100)/6.5*sqrt(36)
z
## [1] 16.8
upper<-118.2 + 1.65*(6.5/sqrt(36))
upper
## [1] 119.9875
lower<-118.2 - 1.65*(6.5/sqrt(36))
lower
## [1] 116.4125
1-pnorm(10500,9000,1000)
## [1] 0.0668072
SE<-1000/sqrt(15)
SE
####c)
z<-(10500-9000)/258
1-pnorm(z)
## [1] 3.050719e-09
####Probability is 0%
####d)
library(DATA606)
## Loading required package: shiny
## Warning: package 'shiny' was built under R version 3.5.2
## Loading required package: openintro
## Warning: package 'openintro' was built under R version 3.5.2
## 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
## Warning: package 'OIdata' was built under R version 3.5.2
## Loading required package: RCurl
## Warning: package 'RCurl' was built under R version 3.5.2
## Loading required package: bitops
## Loading required package: maps
## Warning: package 'maps' was built under R version 3.5.2
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.5.2
##
## Attaching package: 'ggplot2'
## The following object is masked from 'package:openintro':
##
## diamonds
## Loading required package: markdown
## Warning: package 'markdown' was built under R version 3.5.2
##
## 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(9000, 1000)
normalPlot(9000, 1000/sqrt(15))
####e) No we cannot estimates parts a and c with a skewed distribution as we require the population distribution to be approximately normal.Sample size of 1 in part a and 15 in part c are too small to use the Central Limit Theorem.
#Problem: 4:48
####If sample size increases, Z value will increase. P is the probability of obtaining the value of the test statistic, or a more extreme value,when the null hypothesis is true. As Z increases, p value will decrease.