Project 48: Lin Reg T Test

Intro Problem: An AP Statistics teacher believes that there is a linear relationship between number of classes missed for a unit and the student's unit test grade.

The teacher plans to test his hypothesis at the .05 level, the teacher randomly samples 7 AP Stats students and observes the following data:

number of missed classes: 0 1 4 2 3 0 1

unit test grade: 90 85 70 84 78 93 88


Ho: B = 0 (The true slope between these two variables is 0; so there is no linear relationship)

Ha: B ≠ 0 (The true slope between these two variables is not 0; so there is some linear relationship)

b = sample slope = -5.03

seSlope = .525


Explanation: 

Since the p-value is .0002, which is less than the significance level of .05, we reject Ho.  We get evidence that there is a true (useful) linear relationship between number of class periods missed and unit test scores.


Project 48: The variables 'x' and 'y' have been initialized.  There are working methods called getM, getB, getSESlope, tcdf, and invT.

x and y are the x and y values of the sample.

getM(x,y) returns the slope of the LSRL for x and y

getB(x,y) returns the y-intercept of the LSRL for x and y.

getSESlope(x,y) returns the standard error of the slope.

tcdf(low, high, df) returns the probability that t is between low and high (with 'df' degrees of freedom)

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

Task: Appropriately initialize the values 'df', 't', and 'pValue' that represent the degrees of freedom, the test statistic (t-score), and pValue for the two-sided linear regression t-test.

Note: two-sided means Ha is that the true slope between x and y is not 0 (as opposed to strictly less than 0 or strictly greater than 0).

**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