Project 43: One Sample T-Interval

Intro Problem: We want to estimate the mean GPA of all Georgia high school students at the 90% confidence level.

We randomly sample 20 GA high schoolers and record their official GPAs.  The mean and standard deviation of the sample GPAs is 83.5 and 8.5, respectively.

Explanation:  Assuming the sample of 20 GPAs is fairly symmetrical, we can assume the sampling distribution of x-bar is approximately normal. 

Standard Error = 8.5/sqrt(20) = 1.9

Critical Value = 1.73   (The T value with left-tail area .95 to contain the middle 90% with 19 degrees of freedom)

Margin of Error = 1.9*1.73 = 3.29

Confidence Interval: 83.5 ± 3.29 = [80.21, 86.79]

We are 90% confident that the true mean GPA of all Ga high schoolers is between 80.21 and 86.79.

Project 43: Variables 'data' and 'confidenceLevel' have been initalized.  There are also working methods called getMean, getSD, tcdf and invT.

data is the sample dataset.

confidenceLevel is how confident we want to be in our interval (.9 in the example above)

Note: confidence level is a number between 0 and 1 (proportion) not 0 and 100 (percentage)

tcdf(lower, upper, df) represents the area (proportion) under the t-distribution curve with df degrees of freedom from lower to upper.

Example: tcdf(0,1,10) = .3295

invT(area, df) represents the t-score with left-tail area given and df degrees of freedom.

Example: invT(.6, 20) = .257 because tcdf(-100, .257, 20) is .6

getMean(data) returns the mean (average of the dataset)

getSD(data) returns the standard deviation of the dataset

Task: Appropriately initialize the values 'lower' and 'upper' which represent the lower and upper bound for the confidence interval given.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0