—————————————————————————

Student Name : Sachid Deshmukh

—————————————————————————

library('DATA606')
## Loading required package: shiny
## Loading required package: openintro
## Please visit openintro.org for free statistics materials
## 
## Attaching package: 'openintro'
## The following object is masked from 'package:datasets':
## 
##     cars
## Loading required package: OIdata
## Loading required package: RCurl
## Loading required package: bitops
## Loading required package: maps
## Loading required package: ggplot2
## 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. 4.4 Heights of adults

  1. 4.14 Thanksgiving spending Part1

  1. 4.24 Gifted Children Part-1

  1. 4.26 Gifted Children Part-2

  1. 4.34 CLT

Sampling distribution of the sample means is the distribution by drawing multiple samples from population and plotting sample means. As per central limit theorum this distribution is always normal irrespective of the actual distribution of the population from which samples are drawn. It is recommended to have sample size >= 30 to get best results while performing hypothesis testing. As sample size increases the standard error goes down and we can better estimate population parameter.

  1. 4.40 CFLBs

Probability of x > 10500 is 1-pnorm(1.5) = 0.0668

normalPlot(mean = 0, sd = 1, bounds=c(1.5,4), tails = FALSE)

Black : Denotes population distribution Red: Denotes sampling distribution

s <- seq(5000,13000,0.01)
plot(s, dnorm(s,9000, 1000), type="l", ylim = c(0,0.002), ylab = "", xlab = "Lifespan (hours)")
lines(s, dnorm(s,9000, 258.1989), col="red")

  1. 4.48 Same observation with different sample size

As sample size increases, standard error decreases and Z value increases for positive Z and decreases for negative Z. This change in Z value causes P value to decrease