Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 1 Basics of Statistical Inference

Similar presentations


Presentation on theme: "Lecture 1 Basics of Statistical Inference"— Presentation transcript:

1 Lecture 1 Basics of Statistical Inference
Bus 621 Statistics Lecture 1 Basics of Statistical Inference

2 Lecture 1 Inference for a single numerical variable
Statement of hypotheses P-value concept How to communicate the results of a test Inference for a single numerical variable and a categorical variable with 2 categories Inference for a single categorical variable Inference for 2 categorical variables As a result of this class, you will be able to ...

3 Descriptive Statistics Inferential Statistics
Statistical Methods Statistical Methods Descriptive Statistics Tutorials Inferential Statistics Hypothesis Testing Estimation 5

4 I am 95% confident that  is between 40 & 60.
Estimation Process Population Mean X= 50 Random Sample I am 95% confident that  is between 40 & 60. Mean, , is unknown Sample 7

5 Unknown Population Parameters Are Estimated
Estimate Population Parameter... with Sample Statistic Mean x Proportion p p Std. Dev. s Differences 1 -  2 x -

6 Estimation Methods Estimation Interval Estimation Point Estimation 14

7 Point Estimation Provides a single value Based on observations from one sample Gives no information about how close the value is to the unknown population parameter Example: Sample mean x = 3 is a point estimate of unknown population mean

8 Interval Estimation Provides a range of values
Based on observations from one sample Gives information about closeness to unknown population parameter Example: Unknown population mean lies between 50 and 70 with 95% confidence

9 Confidence Level Probability that the unknown population parameter falls within interval Denoted (1 –  is probability that parameter is not within interval Typical values are 99%, 95%, 90%

10 Intervals & Confidence Level
Sampling Distribution of Sample Mean _ a /2 a /2 1 - a _ X m = m ` x (1 – α)% of intervals contain μ α% do not Large number of intervals

11 Factors Affecting Interval Width
Data dispersion More variability = larger width Sample size Larger sample = smaller width Have students explain why each of these occurs. Level of confidence can be seen in the sampling distribution. Level of confidence (1 – ) Higher confidence = larger width © T/Maker Co.

12 Accurate Confidence Interval for Mean ( Unknown)
Assumption: Population must be normally distributed

13 Thinking Challenge You’re a time study analyst in manufacturing. You’ve recorded the following task times (min.): 3.6, 4.2, 4.0, 3.5, 3.8, 3.1. What is the 90% confidence interval estimate of the population mean task time? Allow students about 20 minutes to solve.

14 Confidence Interval for a Mean (m) with Unknown s, Using MegaStat
MegaStat does all calculations for you. We can be 90% confident that the population mean falls between and

15 Applications An example using L1 One sample numerical variable.xlsx
Problem 1: Obtain and interpret a 95% confidence interval for the population mean for price per square foot for all combinations of SAD and with/without a pool. Problem 2: Check to see if these confidence intervals may be inaccurate by looking at normality/sample size. Your Turn: Do PS1 problem 1

16 Descriptive Statistics Inferential Statistics
Statistical Methods Statistical Methods Descriptive Statistics Inferential Statistics Hypothesis Testing Estimation 5

17 I believe the mean GPA of this class is 3.5!
What’s a Hypothesis? A belief about a population parameter Parameter is population mean, proportion, slope Must be stated before analysis I believe the mean GPA of this class is 3.5! © T/Maker Co.

18 Reject hypothesis! Not close.
Hypothesis Testing I believe the population mean age is 50 (hypothesis). Reject hypothesis! Not close. Population Mean X = 20 Random sample

19 How do we Measure “Close”?
If hypothesized m value were really the true mean, there should be a high probability of obtaining the observed sample xbar by pure random chance. Call this the p-value If the p-value is smaller than, say, 5%, we “reject” the hypothesized value for m.

20 Sampling Distribution
Basic Idea Sample Means m = 50 H0 Sampling Distribution It is unlikely that we would get a sample mean of this value ... 20 ... therefore, we reject the hypothesis that  = 50. ... if in fact this were the population mean

21 Naming Null & Alternative Hypotheses
Null hypothesis, H0 (pronounced H-oh) always has equality sign: , , or  Alternative hypothesis, Ha , opposite of null Ha always has inequality sign: ,, or  Specified as Ha :  ,, or  some value Example, Ha:  < 3

22 Identifying Hypotheses
Example: Test that the population mean is not 3 Steps: State the question statistically (  3) State the opposite statistically ( = 3) Must be mutually exclusive & exhaustive Designate which is alternative hypothesis (  3) Has the , <, or > sign Designate which is the null hypothesis ( = 3) Called a two-tailed hypothesis because of  in Ha

23 What Are the Hypotheses?
Is the population average amount of TV viewing equal to 12 hours? State the question statistically:  = 12 State the opposite statistically:   12 Select the alternative hypothesis: Ha:   12 State the null hypothesis: H0:  = 12 This is a two-tailed test.

24 What Are the Hypotheses?
Is the population average amount of TV viewing different from 12 hours? State the question statistically:   12 State the opposite statistically:  = 12 Select the alternative hypothesis: Ha:   12 State the null hypothesis: H0:  = 12 This is a two-tailed test.

25 What Are the Hypotheses?
Is the average amount spent in the bookstore greater than $25? State the question statistically:   25 State the opposite statistically:   25 Select the alternative hypothesis: Ha:   25 State the null hypothesis: H0:   25 This is a one-tailed or right-tailed test.

26 What Are the Hypotheses?
Is the average cost per hat less than $20? State the question statistically:  < 20 State the opposite statistically:  ≥ 20 Designate the alternative hypothesis: Ha:  < 20 State the null hypothesis: H0:  ≥ 20 This is a one-tailed or left-tailed test.

27 Level of Significance A “tail” probability of the bell curve used to define how many std. devs. of xbar to judge “closeness” and to compare p-value against. Designated (alpha) Typical values are .01, .05, .10 (.05 is most common) Selected by researcher, otherwise will be given in a problem Defines unlikely values of sample statistic if null hypothesis is true

28 p-Value Approach Probability of obtaining a test statistic more extreme (or than actual sample value, given H0 is true is called the p-value 1- (p-value) is called the confidence in Ha 1-  is called the required confidence to conclude Ha 4. Used to make a decision between hypotheses If confidence in Ha is greater than the required confidence, conclude Ha otherwise find H0 acceptable.

29 The Four Steps of a Hypothesis Test
State Hypotheses Determine p-value (MegaStat) Make decision based on 1-p =confidence in Ha Draw conclusion within context of problem If confidence in Ha is greater than the required confidence, conclude Ha otherwise find H0 acceptable.

30 t Test for Mean ( Unknown)
Assumption for p-value to be accurate Population is normally distributed If not normal, take large sample (n  30) Or switch to a test for population median such as Wilcoxon Mann-Whitney test

31 One-Tailed t Test Example
Is the average capacity of batteries less than 140 ampere-hours? A random sample of 20 batteries had a mean of and a standard deviation of Assume a normal distribution. Test at the .05 level of significance.

32 One-Tailed t Test Solution
p-value =.009 (MegaStat) Conclusion:  ≥ 140  < 140 H0: Ha:  = df = .05 = 19 We can be 99.1% confident that the population mean is less than 140 and since that exceeds the requirement of 95% we can conclude  < 140

33 One-Tailed t Test You’re a marketing analyst for Wal-Mart. Wal-Mart had teddy bears on sale last week. The weekly sales ($00s) of bears sold in 10 stores was: At the .05 level of significance, is there evidence that the average bear sales per store is more than 5 ($00s)? Assume that the population is normally distributed. Allow students about 10 minutes to solve this.

34 One-Tailed t Test Solution*
  5  > 5 H0: Ha:  = df = Required confidence to conclude Ha is 95%. p-value = .111 from MegaStat Confidence in Ha = or .889 .05 = 9 Note: More than 5 have been sold (6.4), but not enough to be significant. There is insufficient evidence that pop. mean is more than 5 since we can be only 88.9% confident.

35 One-tailed T-test for a Mean (m) with Unknown s, Using MegaStat

36 One-tailed T-test for a Mean (m) with Unknown s, Using MegaStat
Hypothesis Test: Mean vs. Hypothesized Value 5.0000 hypothesized value 6.4000 mean Sales ($00) 3.3731 std. dev. 1.0667 std. error 10 n 9 df 1.31 t .1109 p-value (one-tailed, upper)

37 Two-Tailed t Test You work for the FTC. A manufacturer of detergent claims that the mean weight of detergent is 3.25 lb. You take a random sample of 64 containers. You calculate the sample average to be lb. with a standard deviation of .117 lb. At the .01 level of significance, is the manufacturer correct? 3.25 lb. Allow students about 10 minutes to finish this.

38 Two-Tailed t Test Solution*
 = 3.25   3.25 H0: Ha:   df  Need to be 99% confident to conclude Ha p-value = .208 from MegaStat Confidence in Ha = or .792 .01 = 63 There is insufficient evidence pop. mean is not 3.25 since we can only be 79.2% confident. The null hypothesis is acceptable.

39 Applications An example using L1 One sample numerical variable.xlsx
Problem 3: Test the hypothesis that the mean price per square foot mean for SAD3Pool is different than $320 at a level of significance of How does that compare to the 95% confidence interval you calculated in Problem 1. Use a level of significance of .05 in this problem and all that follow. Problem 4: Use the Wilcoxon signed rank test to test whether the median price per square foot for SAD2Pool is different than $320. Problem 5: Test the hypothesis that the mean price per square foot for SAD1NoPool is less than 350. Example 6: Use the Wilcoxon signed rank test to test whether the median price per square foot for SAD1NoPool is less than $350. Your Turn: Do PS1 problems 2,3,4

40 Two Independent Populations Example applications
An economist wishes to determine whether there is a difference in mean family income for households in two socioeconomic groups. An admissions officer of a small liberal arts college wants to compare the mean SAT scores of applicants educated in rural high schools and in urban high schools. How can we tell what to use for these situations? Both have a numerical variable and a categorical variable (with 2 categories) See “Choosing Situation by Data Type” These are comparative studies. The general purpose of comparative studies is to establish similarities or to detect and measure differences between populations. The populations can be (1) existing populations or (2) hypothetical populations.

41 Comparing Two Independent Means, μ1 – μ2, assuming s unknown
Assumptions Independent, random samples Populations are approximately normally distributed Population standard deviations are equal If at least one population is not normal then an alternative test is to compare population medians using the Wilcoxon Mann-Whitney test

42 Hypothesis Test Example
You’re a financial analyst for Charles Schwab. Is there a difference in dividend yield between stocks listed on the NYSE and NASDAQ? You collect the following data: NYSE NASDAQ Number Mean Std Dev Assuming normal populations, is there a difference in average yield ( = .05)? © T/Maker Co.

43 Independent Samples Hypothesis Test Solution
.p-value = .1397 Confidence in Ha Is = .8603 H0: 1 - 2 = 0 (1 = 2) Ha: 1 - 2  0 (1  2)   .05 df  = 24 Need to be 95% confident to conclude Ha There is little evidence of a difference in means since we can only be 86.03% confident that the pop. means are different 41

44 Two Sample T-test & C.I. for Mean Difference Assuming Equal Variances, Using MegaStat

45 Two Sample T-test & C.I. for Mean Difference Assuming Equal Variances, Using MegaStat
Hypothesis Test: Independent Groups (t-test, pooled variance) NYSE NASDAQ 3.27 2.53 mean 1.3 1.16 std. dev. 11 15 n 24 df 0.740 difference (NYSE - NASDAQ) 1.489 pooled variance 1.220 pooled std. dev. 0.484 standard error of difference hypothesized difference 1.53 t .1397 p-value (two-tailed) -0.260 confidence interval 95.% lower 1.740 confidence interval 95.% upper 1.000 margin of error

46 Wilcoxon Mann-Whitney test using MegaStat
 Pr/SF n sum of ranks 32 1035.5 SAD1Pool 29 855.5 SAD2Pool 61 1891 total expected value 69.243 standard deviation 0.621 z corrected for ties with continuity correction .5346 p-value (two-tailed) H0: Population Medians are equal H1: Population Medians are not equal P-value = .5346 We can only be % confident of a difference in population medians. See L1 2 sample tests excel file for this example.

47 Applications An example using the L1 2 sample tests.xlsx excel file.
Example 7: Test whether price per square foot has the same population means for homes with and without pools. Your Turn: Do PS1 problems 5,6,7

48 A single categorical variable: Z Test for a Proportion
Condition nπ and n(1-π) > 5 Z-test from MegaStat Example: Do ranch style homes make up less than 50% of the population of homes? Data: A sample of 108 homes revealed that 54 were ranch style.

49 P-value = .0271 from Excel MegaStat
One-Tailed Solution H0: Ha:  = π ≥ 0.50 π < 0.50 P-value = from Excel MegaStat .05 We can be 97.29% confident that the population proportion is less than 0.5 and therefore can conclude that π < 0.50 95% confidence interval estimate for π We can be 95% confident that the population proportion falls between and Note: A 2-tailed test would have found the null hypothesis acceptable.

50 Applications An example using the L1 Categorical variables tests and CI-1.xls file. Example 8: Test whether less than 50% of the homes are ranch style in the population and obtaining a 95% interval estimate for that population proportion. Your Turn: Do PS1 problems 8

51 Two categorical variables: Chi-square Test for Independence
Chi-square test statistic Example: Do 3 different school districts have the same percentage of ranch, trilevel and two-story homes? Data: A sample of 108 homes revealed the following table. Count of STYLE STYLE SAD ranch trilevel twostory Grand Total SAD1 8 24 11 43 SAD2 15 7 33 SAD3 21 4 32 44 39 25 108

52 P-value = .0005 from Excel MegaStat
Chi-square solution H0: Ha:  = No relationship Relationship exists P-value = from Excel MegaStat .05 We can be 99.95% confident that there is a relationship between school district and style of home A follow up analysis suggests that SAD 1 has fewer ranch homes and more trilevel homes than expected and that the reverse holds for SAD 3. See the Results tab in L1 Categorical variables file for details.

53 Applications An example using the L1 Categorical variables tests and CI-1.xlsx file. Example 9: Test whether there is a relationship between SAD and style of home. Your Turn: Do PS1 problems 9


Download ppt "Lecture 1 Basics of Statistical Inference"

Similar presentations


Ads by Google