Elementary hypothesis testing Purpose of hypothesis testing Type of hypotheses Type of errors Critical regions Significant levels Hypothesis vs intervals.

Slides:



Advertisements
Similar presentations
“Students” t-test.
Advertisements

Hypothesis Testing. To define a statistical Test we 1.Choose a statistic (called the test statistic) 2.Divide the range of possible values for the test.
Hypothesis testing Another judgment method of sampling data.
Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
Chapter 12 Tests of Hypotheses Means 12.1 Tests of Hypotheses 12.2 Significance of Tests 12.3 Tests concerning Means 12.4 Tests concerning Means(unknown.
1 Hypothesis testing. 2 A common aim in many studies is to check whether the data agree with certain predictions. These predictions are hypotheses about.
1 1 Slide STATISTICS FOR BUSINESS AND ECONOMICS Seventh Edition AndersonSweeneyWilliams Slides Prepared by John Loucks © 1999 ITP/South-Western College.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 9 Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and.
Maximum likelihood (ML) and likelihood ratio (LR) test
Hypothesis testing Some general concepts: Null hypothesisH 0 A statement we “wish” to refute Alternative hypotesisH 1 The whole or part of the complement.
Elementary hypothesis testing
Section 7.1 Hypothesis Testing: Hypothesis: Null Hypothesis (H 0 ): Alternative Hypothesis (H 1 ): a statistical analysis used to decide which of two competing.
Sample size computations Petter Mostad
Elementary hypothesis testing
9-1 Hypothesis Testing Statistical Hypotheses Statistical hypothesis testing and confidence interval estimation of parameters are the fundamental.
Maximum likelihood (ML) and likelihood ratio (LR) test
Evaluating Hypotheses Chapter 9 Homework: 1-9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics ~
Inferences About Means of Single Samples Chapter 10 Homework: 1-6.
Chapter 3 Hypothesis Testing. Curriculum Object Specified the problem based the form of hypothesis Student can arrange for hypothesis step Analyze a problem.
BCOR 1020 Business Statistics Lecture 21 – April 8, 2008.
Inference about a Mean Part II
Elementary hypothesis testing Some distributions related to normal distribution Purpose of hypothesis testing Types of hypotheses Types of errors Critical.
Inferences About Process Quality
Chapter 9 Hypothesis Testing.
5-3 Inference on the Means of Two Populations, Variances Unknown
Maximum likelihood (ML)
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 8 Tests of Hypotheses Based on a Single Sample.
Chapter 9 Title and Outline 1 9 Tests of Hypotheses for a Single Sample 9-1 Hypothesis Testing Statistical Hypotheses Tests of Statistical.
AM Recitation 2/10/11.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Experimental Statistics - week 2
Overview Definition Hypothesis
8 - 1 © 2003 Pearson Prentice Hall Chi-Square (  2 ) Test of Variance.
Fundamentals of Hypothesis Testing: One-Sample Tests
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University ECON 4550 Econometrics Memorial University of Newfoundland.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Today’s lesson Confidence intervals for the expected value of a random variable. Determining the sample size needed to have a specified probability of.
1 Power and Sample Size in Testing One Mean. 2 Type I & Type II Error Type I Error: reject the null hypothesis when it is true. The probability of a Type.
1 CSI5388: Functional Elements of Statistics for Machine Learning Part I.
STA Statistical Inference
9-1 Hypothesis Testing Statistical Hypotheses Definition Statistical hypothesis testing and confidence interval estimation of parameters are.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © Dr. John Lipp.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
Interval Estimation and Hypothesis Testing Prepared by Vera Tabakova, East Carolina University.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Section 9-1 Review and Preview.
1 9 Tests of Hypotheses for a Single Sample. © John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. 9-1.
Inen 460 Lecture 2. Estimation (ch. 6,7) and Hypothesis Testing (ch.8) Two Important Aspects of Statistical Inference Point Estimation – Estimate an unknown.
Copyright ©2006 Brooks/Cole A division of Thomson Learning, Inc. Introduction to Probability and Statistics Twelfth Edition Robert J. Beaver Barbara M.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
MATB344 Applied Statistics I. Experimental Designs for Small Samples II. Statistical Tests of Significance III. Small Sample Test Statistics Chapter 10.
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University.
Chapter 12 Tests of Hypotheses Means 12.1 Tests of Hypotheses 12.2 Significance of Tests 12.3 Tests concerning Means 12.4 Tests concerning Means(unknown.
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 7 Inferences Concerning Means.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
4-1 Statistical Inference Statistical inference is to make decisions or draw conclusions about a population using the information contained in a sample.
Ex St 801 Statistical Methods Part 2 Inference about a Single Population Mean (HYP)
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Chapter 8: Inferences Based on a Single Sample: Tests of Hypotheses
Chapter 9 Hypothesis Testing.
Hypothesis Testing: Hypotheses
Chapter 9 Hypothesis Testing.
Chapter 9 Hypothesis Testing.
Presentation transcript:

Elementary hypothesis testing Purpose of hypothesis testing Type of hypotheses Type of errors Critical regions Significant levels Hypothesis vs intervals

Purpose of hypothesis testing Statistical hypotheses are in general different from scientific ones. Scientific hypotheses deal with the behavior of scientific subjects such as interactions between all particles in the universe. These hypotheses in general cannot be tested statistically. Statistical hypotheses deal with the behavior of observable random variables. These are hypotheses that are testable by observing some set of random variables. They are usually related to the distribution(s) of observed random variables. For example if we have observed two sets of random variables x=(x 1,x 2,,,,x n ) and y=(y 1,y 2,,,,y m ) then one natural question arises: are means of these two sets are different? It is a statistically testable hypothesis. Another question may arise do these two sets of random variables come from the population with the same variance? Or do these distribution come from the populations with the same distribution? These questions can be tested using randomly observed samples.

Types of hypotheses Hypotheses can in general be divided into two categories: a) parametric and b) non- parametric. Parametric hypotheses concern with situations when the distribution of the population is known. Parametric hypotheses concern with the value of one or several parameters of this distribution. Non-parametric hypotheses concern with situations when none of the parameters of the distribution is specified in the statement of the hypothesis. For example hypothesis that two set of random variables come from the same distribution is non-parametric one. Parametric hypotheses can also be divided into two families: 1) Simple hypotheses are those when all parameters of the distribution are specified. For example hypothesis that set of random variables come from normal distribution with known variance and known mean is a simple hypothesis 2) Composite hypotheses are those when some parameters of the distribution are specified and others remain unspecified. For example hypothesis that set of random variables come from the normal distribution with a given mean value but unknown variance is a composite hypothesis.

Errors in hypothesis testing Hypothesis is usually not tested alone. It is tested against some alternative one. Hypothesis being tested is called the null-hypothesis and denoted by H 0 and alternative hypothesis is denoted H 1. Subscripts may be different and reflect nature of the alternative hypothesis. Null-hypothesis gets “benefit of doubt”. There are two possible conclusions: reject null-hypothesis or not-reject null- hypothesis. H 0 is only rejected if sample data contains sufficiently strong evidence that it is not true. Usually testing of hypothesis comes to verification of some test statistic (function of the sample points). If this value belongs to some region w hypothesis is rejected.. This region is called critical region. The region complementary to the critical region that is equal to W-w is called acceptance region. By rejecting or accepting hypothesis we can make two types of errors: Type I error: Reject H 0 if it is true Type II error: Accept H 0 when it is false. Type I errors usually considered to be more serious than type II errors. Type I errors define significance levels and Type II errors define power of the test. In ideal world we would like to minimize both of these errors.

Power of the test The probability of Type I error is equal to the size of the critical region, . The probability of the type II error is a function of the alternative hypothesis (say H 1 ). This probability usually denoted by . Using notation of probability we can write: Where x is the sample points, w is the critical region and W-w is the acceptance region. If the sample points belongs to the critical region then we reject the null-hypothesis. Above equations are nothing else than Type I and Type II errors written using probabilistic language. Complementary probability of Type II error, 1-  is also called the power of the test of the null hypothesis against the alternative hypothesis.  is the probability of accepting null-hypothesis if alternative hypothesis is true and 1-  is the probability of rejecting H 0 if H 1 is true Since the power of the test is the function of the alternative hypothesis specification of H 1 is an important step in hypothesis testing. It is usual to use test statistics instead of sample points to define critical region and significance levels.

Critical region Let us assume that we want to test if some parameter of the population is equal to a given value against alternative hypothesis. Then we can write: Test statistic is usually a point estimation for  or somehow related to it. If critical region defined by this hypothesis is an interval (-  ;c u ] then c u is called the critical value. It defines upper limit of the critical interval. All values of the statistic to the left of c u leads to rejection of the null-hypothesis. If the value of the test statistic is to the right of c u this leads to not-rejecting the hypothesis. This type of hypothesis is called left one-sided hypothesis. Problem of the hypothesis testing is either for a given significance level find c u or for a given sample statistic find the observed significance level (p-value).

Significance level It is common in hypothesis testing to set probability of Type I error,  to some values called the significance levels. These levels usually set to 0.1, 0.05 and If null hypothesis is true and probability of observing value of the current test statistic is lower than the significance levels then hypothesis is rejected. Consider an example. Let us say we have a sample from the population with normal distribution N( ,  2 ). We want to test following null-hypothesis against alternative hypothesis: H 0 :  =  0 and H 1 :  <  0 This hypothesis is left one-sided hypothesis. Because all parameters of the distribution (mean and variance of the normal distribution) have been specified it is a simple hypothesis. Natural test statistic for this case is the sample mean. We know that sample mean has normal distribution. Under null-hypothesis mean for this distribution is  0 and variance is  /  n. Then we can write: If we use the fact that Z is standard normal distribution (mean 0 and variance 1) then using the tables of standard normal distribution we can solve this equation.

Significance level: Cont. Let us define: Then we need to solve the equation (using standard tables or programs): Having found z  we can solve the equation w.r.t c u. If the sample mean is less than this value of c u we would reject with significance level . If sample mean is greater than this value then we would not reject null- hypothesis. If we reject (sample mean is smaller than c u ) then we would say that if the population mean would be equal to  0 then probability that we would observe sample mean is . To find the power of the test we need to find probability under condition that alternative hypothesis is true.

Significance level: An example. Let us assume that we have a sample of size 25 and sample mean is 128. We know that this sample comes from the population with normal distribution with variance 5.4. We do not know population mean. We want to test the following hypothesis: H 0 :  =130, against H 1 :  <130 We have  0 = 130. Let us set significance level to Then from the table we can find that z 0.05 =1.645 and we can find c u. c u =  0 –z /  25 = /5 = Since the value of the sample mean (128) belongs to the critical region (I.e. it is less than ) we would reject null-hypothesis with significance level Test we performed was left one-sided test. I.e. we wanted to know if value of the sample mean is less than assumed value (130). Similarly we can build right one-sided tests and combine these two tests and build two sided tests. Right sided tests would look like H 0 :  =  0 against H 1 :  >  0 Then critical region would consist of interval [c l ;  ). Where c l is the lower bound of the critical region And two sided test would look like H 0 :  =  0 against H 1 :  0 Then critical region would consists combination of two intervals (-  ;c u ]  [c l ;  ).

Composite hypothesis In the above example we assumed that the population variance is known. It was simple hypothesis (all parameters of the normal distribution have been specified). But in real life it is unusual to know the population variance. If population variance is not known the hypothesis becomes composite (hypothesis defines the population mean but population variance is not known). In this case variance is calculated from the sample and it replaces the population variance. Then instead of normal t distribution with n-1 degrees of freedom is used. Value of z  is found from the table of the t n-1 distribution. If n (>100) is large then as it can be expected normal distribution very well approximates t distribution. Above example can be easily extended for testing differences between means of two samples. If we have two samples from the population with equal but unknown variances then tests of differences between two means comes to t distribution with (n 1 +n 2 -2) degrees of freedom. Where n 1 is the size of the first sample and n 2 is the size of the second sample. If variances for both population variances would be known then testing differences between two means comes to normal distribution.

P-value of the test Sometimes instead of setting pre-defined significance level p-value is reported. It is also called observed significance level. Let us analyse it. Let us consider above example when we had sample of size 25 with the sample mean 128. We assumed that we knew population variance – 5.4. P-value is calculated as follows: We would reject null-hypothesis with significance level 0.05 but we would accept it with significance level Probability if the population mean would be 130 observing 128 or less has probability In other word if would draw 100 times sample of size 25 would observe around 3 times that mean value is less or equal to 128.

Hypothesis testing vs intervals Some modern authors in statistics think that significance testing is overworked procedure. It does not make much sense once we have observed the sample. Then it is much better to work with confidence intervals. Since we can calculate statistics related with the parameter we want to estimate then we can make inference that where “true” value of the parameter may lie. As we could see in the above example we would reject particular hypothesis with significance level 0.01 but would accept with the significance level Testing hypothesis did not say anything about parameter in spite of the fact that we had the sample mean. On the contrary confidence interval at least says where “true” value may be and do we need more experiment to increase our confidence and reduce interval size.

Further reading Full exposition of hypothesis testing and other statistical tests can be found in: Stuart, A., Ord, JK, and Arnold, S. (1991) Kendall’s advanced Theory of statistics. Volume 2A. Classical Inference and the Linear models. Arnold publisher, London, Sydney, Auckland Box, GEP, Hunter, WG, Hunter, JS (1978) Statistics for experimenters

Exercise 1 Two species (A and B) of trees were planted randomly. Each specie had 10 plots. Average height for each plot was measured after 6 years. Analyze differences in means. A: B: Write a report. Hint: Use t.test for differences in means and var.test for differences in variances.