Working backwards, Part II. (5.24, p. 203) A 90% confidence interval for a population mean is (65, 77). The population distribution is approximately normal and the population standard deviation is unknown. This confidence interval is based on a simple random sample of 25 observations. Calculate the sample mean, the margin of error, and the sample standard deviation.
lower_interval<-65
upper_interval<-77
n<-25
sample_mean<-(upper_interval+lower_interval)/2
The Sample Mean is 71
margin_of_error<-(upper_interval-lower_interval)/2
The margin of error is 6
The Sample Standard Deviation
difference <- 25 - 1
prob <- 0.9
tail_val <- prob + (1 - prob)/2
val_t <- qt(tail_val, difference)
SE <- margin_of_error / val_t
sd <- SE * sqrt(n)
sd
## [1] 17.53481
SAT scores. (7.14, p. 261) SAT scores of students at an Ivy League college are distributed with a standard deviation of 250 points. Two statistics students, Raina and Luke, want to estimate the average SAT score of students at this college as part of a class project. They want their margin of error to be no more than 25 points.
z_value <- 1.65
Margin_Of_Error <- 25
stdev <- 250
n <- ((z_value * stdev) / Margin_Of_Error ) ^ 2
The total Sample size should be 272.25
The sample Size should be larger as the value of Z will be higer and multiplied by a squared standard deviation.
z_value <- 2.575
n <- ((z_value * stdev) / Margin_Of_Error ) ^ 2
The total Sample size should be 663.0625
High School and Beyond, Part I. (7.20, p. 266) The National Center of Education Statistics conducted a survey of high school seniors, collecting test data on reading, writing, and several other subjects. Here we examine a simple random sample of 200 students from this survey. Side-by-side box plots of reading and writing scores as well as a histogram of the differences in scores are shown below.
I do not see a clear difference there is a however a difference and distribution seems to be normal.
No they are not independant of eachother
H0: The difference of average in between reading and writing equal zero. That is:
HA: The difference of average in between reading and writing does NOT equal zero. That is:
The Observations are independant of one another
The distribution is normal distirbution.
Since the p value less than .05 we will reject the alternate hypohesis and accept the null hypothesis
we may incorrectly reject the null hypothesis.
We may incorrectly reject the alternate hypothesis.
I would expect the difference between the average reading and writing scores to include 0 . The reason is when the confidence interval includes 0 it could mean the difference could be negative or positive.
Fuel efficiency of manual and automatic cars, Part II. (7.28, p. 276) The table provides summary statistics on highway fuel economy of cars manufactured in 2012. Use these statistics to calculate a 98% confidence interval for the difference between average highway mileage of manual and automatic cars, and interpret this interval in the context of the data.
H0- The difference between the average miles between manual and automatic is equal to 0
HA: The difference between the average miles between manual and automatic is not equal to 0
n <- 26
mean_automatic <- 16.12
sd_automatic <- 3.58
mean_manual <- 19.85
sd_manual <- 4.51
mean_difference <- mean_automatic - mean_manual
Standard_Error_Difference <- ( (sd_automatic ^ 2 / n) + ( sd_manual ^ 2 / n) ) ^ 0.5
Value <- (mean_difference - 0) / Standard_Error_Difference
df <- n - 1
p <- pt(Value, df = df)
p
## [1] 0.001441807
Looks like the P value is less than 0.05 we reject the null hypothesis and it suggest that there is ecvidence that there is a difference in Fuel efficiency between manual and automatic
Email outreach efforts. (7.34, p. 284) A medical research group is recruiting people to complete short surveys about their medical history. For example, one survey asks for information on a person’s family history in regards to cancer. Another survey asks about what topics were discussed during the person’s last visit to a hospital. So far, as people sign up, they complete an average of just 4 surveys, and the standard deviation of the number of surveys is about 2.2. The research group wants to try a new interface that they think will encourage new enrollees to complete more surveys, where they will randomize each enrollee to either get the new interface or the current interface. How many new enrollees do they need for each interface to detect an effect size of 0.5 surveys per enrollee, if the desired power level is 80%?
Work hours and education. The General Social Survey collects data on demographics, education, and work, among many other characteristics of US residents.47 Using ANOVA, we can consider educational attainment levels for all 1,172 respondents at once. Below are the distributions of hours worked by educational attainment and relevant summary statistics that will be helpful in carrying out this analysis.