Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applied Quantitative Analysis and Practices LECTURE#25 By Dr. Osman Sadiq Paracha.

Similar presentations


Presentation on theme: "Applied Quantitative Analysis and Practices LECTURE#25 By Dr. Osman Sadiq Paracha."— Presentation transcript:

1 Applied Quantitative Analysis and Practices LECTURE#25 By Dr. Osman Sadiq Paracha

2 Previous Lecture Summary Inference about the slope t test for slope Inference about the slope (t test example) F test for significance Confidence Interval estimate for slope Confidence Interval concept and calculation

3 Inferences About the Slope: t Test t test for a population slope Is there a linear relationship between X and Y? Null and alternative hypotheses H 0 : β 1 = 0(no linear relationship) H 1 : β 1 ≠ 0(linear relationship does exist) Test statistic where: b 1 = regression slope coefficient β 1 = hypothesized slope S b1 = standard error of the slope

4 Inferences About the Slope: t Test Example House Price in $1000s (y) Square Feet (x) 2451400 3121600 2791700 3081875 1991100 2191550 4052350 3242450 3191425 2551700 Estimated Regression Equation: The slope of this model is 0.1098 Is there a relationship between the square footage of the house and its sales price?

5 Inferences About the Slope: t Test Example H 0 : β 1 = 0 H 1 : β 1 ≠ 0 CoefficientsStandard Errort StatP-value Intercept98.2483358.033481.692960.12892 Square Feet0.109770.032973.329380.01039 b1b1

6 Inferences About the Slope: t Test Example Test Statistic: t STAT = 3.329 There is sufficient evidence that square footage affects house price Decision: Reject H 0 Reject H 0  /2=.025 -t α/2 Do not reject H 0 0 t α/2  /2=.025 -2.30602.3060 3.329 d.f. = 10- 2 = 8 H 0 : β 1 = 0 H 1 : β 1 ≠ 0

7 Inferences About the Slope: t Test Example H 0 : β 1 = 0 H 1 : β 1 ≠ 0 CoefficientsStandard Errort StatP-value Intercept98.2483358.033481.692960.12892 Square Feet0.109770.032973.329380.01039 p-value There is sufficient evidence that square footage affects house price. Decision: Reject H 0, since p-value < α

8 F Test for Significance F Test statistic: where where F STAT follows an F distribution with k numerator and (n – k - 1) denominator degrees of freedom (k = the number of independent variables in the regression model)

9 F-Test for Significance Regression Statistics Multiple R0.76211 R Square0.58082 Adjusted R Square0.52842 Standard Error41.33032 Observations10 ANOVA dfSSMSFSignificance F Regression118934.9348 11.08480.01039 Residual813665.56521708.1957 Total932600.5000 With 1 and 8 degrees of freedom p-value for the F-Test

10 H 0 : β 1 = 0 H 1 : β 1 ≠ 0  =.05 df 1 = 1 df 2 = 8 Test Statistic: Decision: Conclusion: Reject H 0 at  = 0.05 There is sufficient evidence that house size affects selling price 0  =.05 F.05 = 5.32 Reject H 0 Do not reject H 0 Critical Value: F  = 5.32 F Test for Significance (continued) F

11 Confidence Interval Estimate for the Slope Confidence Interval Estimate of the Slope: Excel Printout for House Prices: At 95% level of confidence, the confidence interval for the slope is (0.0337, 0.1858) CoefficientsStandard Errort StatP-valueLower 95%Upper 95% Intercept98.2483358.033481.692960.12892-35.57720232.07386 Square Feet0.109770.032973.329380.010390.033740.18580 d.f. = n - 2

12 Since the units of the house price variable is $1000s, we are 95% confident that the average impact on sales price is between $33.74 and $185.80 per square foot of house size CoefficientsStandard Errort StatP-valueLower 95%Upper 95% Intercept98.2483358.033481.692960.12892-35.57720232.07386 Square Feet0.109770.032973.329380.010390.033740.18580 This 95% confidence interval does not include 0. Conclusion: There is a significant relationship between house price and square feet at the.05 level of significance Confidence Interval Estimate for the Slope (continued)

13 Confidence Interval Example Cereal fill example Population has µ = 368 and σ = 15. If you take a sample of size n = 25 you know 368 ± 1.96 * 15 / = (362.12, 373.88). 95% of the intervals formed in this manner will contain µ. When you don’t know µ, you use X to estimate µ If X = 362.3 the interval is 362.3 ± 1.96 * 15 / = (356.42, 368.18) Since 356.42 ≤ µ ≤ 368.18 the interval based on this sample makes a correct statement about µ. But what about the intervals from other possible samples of size 25?

14 Confidence Interval Example (continued) Sample #X Lower Limit Upper Limit Contain µ? 1362.30356.42368.18Yes 2369.50363.62375.38Yes 3360.00354.12365.88No 4362.12356.24368.00Yes 5373.88368.00379.76Yes

15 Confidence Interval Example In practice you only take one sample of size n In practice you do not know µ so you do not know if the interval actually contains µ However you do know that 95% of the intervals formed in this manner will contain µ Thus, based on the one sample, you actually selected you can be 95% confident your interval will contain µ (this is a 95% confidence interval) (continued) Note: 95% confidence is based on the fact that we used Z = 1.96.

16 Estimation Process (mean, μ, is unknown) Population Random Sample Mean X = 50 Sample I am 95% confident that μ is between 40 & 60.

17 General Formula The general formula for all confidence intervals is: Point Estimate ± (Critical Value)(Standard Error) Where: Point Estimate is the sample statistic estimating the population parameter of interest Critical Value is a table value based on the sampling distribution of the point estimate and the desired confidence level Standard Error is the standard deviation of the point estimate

18 Confidence Intervals Population Mean σ Unknown Confidence Intervals Population Proportion σ Known

19 Confidence Interval for μ (σ Known) Assumptions Population standard deviation σ is known Population is normally distributed If population is not normal, use large sample (n > 30) Confidence interval estimate: where is the point estimate Z α/2 is the normal distribution critical value for a probability of  /2 in each tail is the standard error

20 Finding the Critical Value, Z α/2 Consider a 95% confidence interval: Z α/2 = -1.96Z α/2 = 1.96 Point Estimate Lower Confidence Limit Upper Confidence Limit Z units: X units: Point Estimate 0

21 Common Levels of Confidence Commonly used confidence levels are 90%, 95%, and 99% Confidence Level Confidence Coefficient, Z α/2 value 1.28 1.645 1.96 2.33 2.58 3.08 3.27 0.80 0.90 0.95 0.98 0.99 0.998 0.999 80% 90% 95% 98% 99% 99.8% 99.9%

22 Intervals and Level of Confidence Confidence Intervals Intervals extend from to (1-  )100% of intervals constructed contain μ; (  )100% do not. Sampling Distribution of the Mean x x1x1 x2x2

23 Example A sample of 11 circuits from a large normal population has a mean resistance of 2.20 ohms. We know from past testing that the population standard deviation is 0.35 ohms. Determine a 95% confidence interval for the true mean resistance of the population.

24 Example A sample of 11 circuits from a large normal population has a mean resistance of 2.20 ohms. We know from past testing that the population standard deviation is 0.35 ohms. Solution: (continued) DCOVA

25 Interpretation We are 95% confident that the true mean resistance is between 1.9932 and 2.4068 ohms Although the true mean may or may not be in this interval, 95% of intervals formed in this manner will contain the true mean DCOVA

26 t Test for a Correlation Coefficient Hypotheses H 0 : ρ = 0 (no correlation between X and Y) H 1 : ρ ≠ 0 (correlation exists) Test statistic (with n – 2 degrees of freedom)

27 t-test For A Correlation Coefficient Is there evidence of a linear relationship between square feet and house price at the.05 level of significance? H 0 : ρ = 0 (No correlation) H 1 : ρ ≠ 0 (correlation exists)  =.05, df = 10 - 2 = 8 (continued)

28 t-test For A Correlation Coefficient Conclusion: There is evidence of a linear association at the 5% level of significance Decision: Reject H 0 Reject H 0  /2=.025 -t α/2 Do not reject H 0 0 t α/2  /2=.025 -2.30602.3060 3.329 d.f. = 10-2 = 8 (continued)

29 Pitfalls of Regression Analysis Lacking an awareness of the assumptions underlying least-squares regression Not knowing how to evaluate the assumptions Not knowing the alternatives to least-squares regression if a particular assumption is violated Using a regression model without knowledge of the subject matter Extrapolating outside the relevant range

30 Strategies for Avoiding the Pitfalls of Regression Start with a scatter plot of X vs. Y to observe possible relationship Perform residual analysis to check the assumptions Plot the residuals vs. X to check for violations of assumptions such as homoscedasticity Use a histogram, stem-and-leaf display, boxplot, or normal probability plot of the residuals to uncover possible non-normality

31 Strategies for Avoiding the Pitfalls of Regression If there is violation of any assumption, use alternative methods or models If there is no evidence of assumption violation, then test for the significance of the regression coefficients and construct confidence intervals and prediction intervals Avoid making predictions or forecasts outside the relevant range (continued)

32 Lecture Summary Confidence Interval Concept Confidence Interval examples t test for correlation coefficient Application of t test in correlation coefficient Pitfalls of Regression Strategies to avoid pitfalls in regression SPSS Application in regression


Download ppt "Applied Quantitative Analysis and Practices LECTURE#25 By Dr. Osman Sadiq Paracha."

Similar presentations


Ads by Google