860 likes | 1.13k Views
Inferential Statistics: Hypothesis Testing. Hypothesis Testing Testing Population Means. Inferential Statistics. Estimation Estimate population means Estimate population proportion Estimate population variance Hypothesis testing Testing population means
E N D
Inferential Statistics: Hypothesis Testing Hypothesis Testing Testing Population Means
Inferential Statistics • Estimation • Estimate population means • Estimate population proportion • Estimate population variance • Hypothesis testing • Testing population means • Testing categorical data / proportion • Testing population variances • Hypothesis about many population means • One-way ANOVA • Two-way ANOVA
Hypothesis Testing • Hypothesis testing is a scientific method used for making decision, conclusion or prove of the finding of research • Perform on data collected from sample based on stated hypotheses • Hypothesis testing process ensure the reproducibility of result conclusion and the ability to infer the hypotheses on the population with certain confidence level
Hypothesis Testing Process • Forming statistical hypothesis / research hypothesis • Define statistical significant level (α) • Usually 0.05 (5%), or 0.01 for research needing higher accuracy • Select and calculate the appropriate statistic from data collected from sample • Accept/reject hypothesis based on corresponding score tables • Make conclusion / decision
Hypothesis • The expected rational conclusion of statistical analysis • Research Hypothesis • Written in text • Statistical Hypothesis • Written in mathematical form using parameter
Research Hypothesis • Text identifying the expected relation from the research • Based on the variable test • Relational hypothesis • Comparative hypothesis • Based on direction of relationship of variables • Directional hypothesis • Non-directional hypothesis
Relational and Comparative • Relational hypothesis focuses on the relationship between 2 or more variables • E.g. Hours of study is related to examination scores • Comparative hypothesis focuses on comparing the difference between 2 or more variables • E.g. Male students and female students have different exam scores
Directional and Non-directional Directional – able to identify the direction of the relationship between variables Non-directional – unable to clearly identify the direction of the relationship between variables
Research Hypothesis Examples • Handwriting and examination score are related • Relational, non-directional • Handwriting and examination score are positivelyrelated • Relational, directional • Female students get higher final exam score than male student • Comparative, directional • The scores of female and male students are different • Comparative, non-directional
Statistical Hypothesis Written in mathematical form Always use population parameter μ(Mu) = population mean σ (sigma) = Standard Deviation σ2 = variance p = population proportion
Statistical Hypothesis • H0: Null hypothesis • Always non-directional • Must have “=” (also “>=” and “<=”) • H1: Alternative hypothesis • Always directional, exclusively opposite to null hypothesis • Must not have “=” (only “>”, “<”, “!=”) • Be very careful when writing statistical hypothesis, some can be tricky
Statistical Hypothesis Examples Female students get higher final exam score than male student H0 : μf <= μm H1 : μf > μm Female students get final exam score higher than or equal to (no less than) male student H0 : ? H1 : ? The scores of female and male students are different H0 : μf = μm H1 : μf != μm
Error in Hypothesis Testing • Type I Error • Error caused by rejecting H0 when H0 is true • Probability of type I error is equal to α which is statistical significant level defined in the analysis • Type II Error • Error caused by accepting H0 when H0 is false • Probability of type I error is equal to β
Power of Test • The probability to reject null hypothesis (H0) when it is false. • In other words, the sensitivity to accept alternate hypothesis (H1) when it is true • Power of Test depends on • Sufficient size of sample • The process of data collection • Appropriate selection of statistic according to population distribution and assumption of each statistic
Degree of Freedom • The value that indicates the degree of variability under certain criteria • Degree of Freedom (df) usually bind to the number of sample or groups within sample • E.g. in the estimation of mean, 1 of the sample loses its freedom. Therefore, the df is n-1 • If the mean of 5 data item is 10, and first four data item are 7, 9, 11, 13, the last item must be 10 • Thus, under the calculation of mean, the value of the last item cannot vary, losing its freedom
Hypothesis Testing • Directional Test / One-Tailed Test • Right-Tailed H0 : θ <= θk H1 : θ > θk • Left-Tailed H0 : θ >= θk H1 : θ < θk • Non-directional Test / Two-Tailed Test H0 : θ = θk H1 : θ != θk • θ: A population parameter
Testing Population Mean Single population Two independent populations Two dependent populations (paired samples)
Steps in Testing Mean • Forming statistical hypothesis from research hypothesis • Left-tailed, Right-tailed, Two-tailed • Define statistical significant level (α) • Usually 0.05 (5%), or 0.01 for research needing higher accuracy • Calculated test statistic • Compare the calculated value to critical value from table to determine if it falls into critical region Right-tailed Left-tailed Two-tailed • Finally, make decision/conclusion
Single Population Mean Known population variance σ2 Unknown population variance σ2, small sample (n < 30) Unknown population variance σ2, large sample (n ≥ 30)
Known Population Variance • Test mean of one sample against a test value • E.g. Test if average total score is more than 55 • Assumptions • Variable of interval or ratio scale • Sampling using probabilistic sampling • Each data item is independent of each other • Known population variance
Known Population Variance Hypotheses Critical Region H0 : μ < μ0 H1 : μ > μ0 σ2 known H0 : μ > μ0 H1: μ < μ0 σ2 known
Example 1 A sawmill cuts wood log into 30-inch lumbers. It is known that the variance of the lumber length is 0.5 inch2. To test the machine, 16 lumbers are sampled yielding the average of 30.25 inch. Assuming normal distribution of lumber population, test if this machine is accurate at significant level 0.05 Hypotheses
Example 1 Calculate test statistic Z-score from table The calculated z-score is -1.96 < 1.41 < 1.96, and does not fall in critical region. Thus cannot reject null hypothesis H0 Accept H0 and reject H1 The machine is accurate at significant level 0.05
Example 2 A research of student proficiency in a university reports that the average score is 100 with SD of 16. A researcher then use a proficiency test on 64 sample students from this university. The result is a mean score of 121. Test if the student proficiency increases at significant level 0.01 Hypotheses α = 0.01
Example 2 Calculate test statistic z-score from table The calculated z-score is 10.50 > 2.326, falling in critical region. Reject H0 and accept H1 The student proficiency increases at significant level 0.01
Unknown Population Variance • Assumptions • Variable of interval or ratio scale • Sampling using probabilistic sampling • Each data item is independent of each other • Unknown population variance
Unknown Population Variance, n<30 Hypotheses Critical Region df H0 : μ < μ0 H1 : μ > μ0 σ2 unknown H0 : μ > μ0 H1 : μ < μ0 σ2 unknown
Example 1 A company believe that its employees will work for the company for no less than 8 year. To test this, 16 sample of employee records are study and are found that they work for the company for 5, 9, 7, 11, 11, 8, 3, 7, 6, 8, 6, 4, 8, 2, 5, 6 years. Is the company’s belief true at significant level 0.05 assuming normal distribution of population. Hypothesis H0: ? H1: ? α = 0.05
Example 1 Calculate test statistic
Example 1 t-score from table The calculated t-score is -2.15 < -1.753, falling in left-tailed critical region. Reject H0 and accept H1 Conclusion?
Example 2 H0 : μ < 17 H1 : μ > 17 A study of complementary class with a sample of 25 students. After the class, the average exam score of the sample is 22 with SD of 5.6. Test if this complementary class can increase the score above the criterion of 17 at significant level 0.05. Hypothesis α = 0.05
Example 2 Calculate test statistic t-score from table: t0.05(24)= 1.711 The calculated t-score is 2.50 > 1.711, falling in right-tailed critical region. Reject H0 and accept H1 The complementary class can increase the exam score above the criterion at significant level 0.05
Unknown Population Variance, n ≥ 30 Hypotheses Critical Region H0 : μ < μ0 H1 : μ > μ0 σ2 unknown H0 : μ > μ0 H1 : μ < μ0 σ2 unknown
Example 1 By sampling 100 female deceased in the previous year, it is found that the average lifespan is 71.8 year with SD of 8.9 year. Does this data support the assumption that the average lifespan of current female citizen is more than 70 years at significant level 0.05? Hypothesis α = 0.05
Example 1 Calculate test statistic z-score from table: The calculated z-score is 2.02 > 1.645, falling in right-tailed critical region. Reject H0 and accept H1 The average lifespan of current female citizen is more than 70 years at significant level 0.05
Example 2 According to a company, the food expense of its employees is 550 THB. In order to adjust salaries, the company want to know if this expense increases. From a sample of 30 employee, the average food expense is 590 THB with SD of 90. (Significant level 0.01) Hypothesis α = 0.01
Example 2 Calculate test statistic z-score from table: Z0.01= 2.326 The calculated z-score is 2.434 > 2.326, falling in right-tailed critical region. Reject H0 and accept H1 The food expense of employees increases at significant level 0.01
Testing Population Mean Single population Two independent populations Two dependent populations (paired samples)
Two Independent Populations • Known variances of the two populations • Known • Unknown population variances, small sample (n < 30) • Unknown • Unknown population variances, large sample (n ≥ 30) • Unknown • Unknown population variances but known to be equal
Known Variances of Two Populations • Test mean of one sample against another • Assumptions • Variables (samples) are independent of each other • Variables of interval or ratio scale • Sampling using probabilistic sampling from population of normal distribution • Each data item is independent of each other • Known population variances
Known Variances of Two Populations Hypotheses Critical Region H0 : μ1 – μ2< d H1 : μ1 – μ2 > d σ12 ,σ22 known H0 : μ1 – μ2> d H1 : μ1 – μ2 < d σ12 ,σ22 known
Example H0 : μ1 = μ2OR μ1 -μ2 = 0 H1 : μ1 ≠μ2OR μ1 -μ2 ≠ 0 The quality comparison between golf balls of type A and B is based on drive distance. From the sample of 25 golf balls from each group, the average drive distances of type A and B is 275 yards and 290 yards respectively. If both types have the same population variance of 225, assuming normal distribution of drive distance, test if both types are of the same quality. Hypothesis α= 0.05