type ii error
DESCRIPTION
Type II Error. The probability of making a Type II error is denoted as b . The actual value of b is unknown, we can only calculate possible values for b . Type II Error. - PowerPoint PPT PresentationTRANSCRIPT
Type II Error
The probability of making a Type II error is denoted as b. The actual value of b is unknown, we can only calculate possible values for b.
Type II Error
Assume we are trying to test to see if the average number of gallons purchased when a driver fills up their tank has fallen. In the past it was 10 gallons and the standard deviation was 4 gallons. A sample of 100 sales is drawn. Set a at .025.
Hypothesis Test with s Known
1. H0: m > 10Ha: m < 10
2. Reject H0 if: z < -1.96Alternatively:Reject H0 if:
216.9100496.110
0
x
x
nzx sm a
Type II Error
What if m really was 9?z = (9.216-9)/.4 = .54b = P(z > .54) = .2946
What if m really was 9.5?z = (9.216-9.5)/.4 = -.71b = P(z > -.71) = .7611
What if m really was 8.5?z = (9.216-8.5)/.4 = 1.79b = P(z > 1.79) = .0367
Type II Error
P. 371-374Non-graded homework:P. 374, #46, 48
Chapter 14
Simple Linear Regression Model
Regression
Used to estimate how much one variable changes with a change in another variable.
Carl Friedrich Gaus
Regression
Dependent variable – The variable whose behavior we are trying to predict.
Independent variable – The variable used to predict the dependent variable.
Temperature and Natural Gas Usage at the
Porter Household
MonthAverage daily temperature
Thousands of cubic feet
Jun-07 66 3.6Jul-07 68 1.8
Aug-07 71 3.7Sep-07 65 2.2Oct-07 61 3.9Nov-07 42 19.3Dec-07 31 25.2Jan-08 29 23.4Feb-08 26 33.7Mar-08 31 27.7Apr-08 51 3.2
May-08 53 4.9Jun-08 67 2.3Jul-08 71 2.1
Aug-08 68 2.7Sep-08 64 2.1Oct-08 52 8.7Nov-08 40 17.3Dec-08 30 31.1Jan-09 19 30.0Feb-09 28 33.9Mar-09 37 21.7Apr-09 49 13.0
May-09 58 4.7Jun-09 65 2.7Jul-09 66 2.6
Aug-09 71 2.3Sep-09 63 2.8Oct-09 48 10.0
Jun-07
Aug-07
Oct-07
Dec-07
Feb-08
Apr-08
Jun-08
Aug-08
Oct-08
Dec-08
Feb-09
Apr-09
Jun-09
Aug-09
Oct-09
0
10
20
30
40
50
60
70
80
Temperature and Natural Gas Consumed
Average daily temperature Thousands of cubic feet
0 10 20 30 40 50 60 70 800
5
10
15
20
25
30
35
40
Monthly Natural Gas Use and Temperature
Average Daily Temperature
Thou
sand
s of c
ubic
feet
Regression
Simple Linear Regression Modely = b0 + b1x + e
Simple Linear Regression Equationy = b0 + b1x
Estimated Simple Linear Regression Equationxbby 10ˆ
Least Squares Criterion 2ˆ ii yymin
xbyb
xx
yyxxb
i
ii
10
21
:equation Intercept
:equation Slope
Excel Regression Output
CoefficientsIntercept 45.88
X Variable 1 -0.66
xyxbby66.088.45ˆ
ˆ 10
Interpreting the Output
b0 – If the average daily temperature is 0 degrees Fahrenheit the predicted gas usage is 45.88 thousand cubic feet
b1 – A 1 degree increase in the average daily temperature reduces the predicted gas usage by 0.66 thousand cubic feet over a month
Interpreting the OutputWhat is the predicted natural gas usage if the temperature is 10 degrees?45.88 – (10)(0.66) = 39.28
What if the temperature is 50 degrees?45.88 – (50)(0.66) = 12.88
What if the temperature is -10 degrees?45.88 – (-10)(0.66) = 52.48
What if the temperature is 100 degrees?45.88 – (100)(0.66) = -20.12
Computing b0 and b1, Example
Car Age (years) Price ($000)1 1 152 3 143 3 114 4 125 9 8
Computing b0 and b1, Examplex y1 15 -3 3 -9 93 14 -1 2 -2 13 11 -1 -1 1 14 12 0 0 0 09 8 5 -4 -20 25
Sum = 20 60 -30 36Mean = 4 12
b1 = -0.83b0 = 15.33
)( xxi )( yyi 2)( xxi ))(( yyxx ii
Coefficient of Determination
The portion of the variation in the data explained by the regression model
Total Sum of Squares
The measure of the total variation in the data.
2 yySST i
0 10 20 30 40 50 60 70 800
5
10
15
20
25
30
35
40
Monthly Natural Gas Use and Temperature
Average Daily Temperature
Thou
sand
s of c
ubic
feet
Sum of Squares Due to Regression
The measure of the variation explained by the regression line.
2ˆ yySSR i
Sum of Squares Due to Error
The measure of the variation left unexplained by the regression line.
2ˆ ii yySSE
Total Sum of Squares
The total sum of squares equals the sum of squares due to regression plus the sum of squares due to error.
SST = SSR + SSE
0 10 20 30 40 50 60 70 800
5
10
15
20
25
30
35
40
Monthly Natural Gas Use and Temperature
Average Daily Temperature
Thou
sand
s of c
ubic
feet
Unexplained
Explained
ii yy ˆ
yyi ˆ
Coefficient of Determinination
The share of the variation explained by the regression line.
r2 = SSR/SST
Excel Regression OutputRegression Statistics
Multiple R 0.953885R Square 0.909896Adjusted R Square 0.906559Standard Error 3.512402Observations 29
ANOVA
df SS MS FSignificance
FRegression 1 3363.7 3363.7 272.7 1.23E-15Residual 27 333.1 12.3Total 28 3696.8
3363.7/3696.8 = 0.9099
Sample Correlation Coefficient
954.09099.1
2
xy
xy
r
rr 1b of sign
Coefficient of Determinationx y SSR SSE SST1 15 14.5 6.2 0.3 93 14 12.84 0.7 1.3 43 11 12.84 0.7 3.4 14 12 12.01 0.0 0.0 09 8 7.86 17.4 0.0 16
Sum=20 Sum=60 25.0 5.0 30Mean=4 Mean=12
b1=-0.833b0=15.33
r2 = 25/30 = .833
y
Model Assumptions1. The error term e is a random variable with
an expected value of 02. The variance of e is the same for all values
of x.3. The values of e are independent4. The error term e is a normally distributed
random variable