6
Basic Concepts of Hypothesis Testing Introduction A hypothesis is a statement or a tentative theory that may or may not be true, but is initially assumed to be true until new evidence suggests otherwise. It may be proposed from a preliminary observation, a guess or based from previous experiences. In hypothesis testing problem, the researcher has in mind a specific notion concerning the characteristics of the population under study before the sample data are gathered. Then investigate the sample information to examine how consistent the data with the hypothesis in questioned. If the sample information deviate much from the stated hypothesis, then researcher tend to disbelieved and reject the proposed statement. Although the proposed statement may be true, it is expected that any single sample (or samples) will differ slightly from the true characteristic of the population and other will not, because of the sampling variation, have the same exact value as the population parameter. Hence, differences between the sample information and the population under study might be due chance. The procedure of statistical test will provide the basis in deciding whether differences between the sample observation and the hypothesized value could be due to sampling variation alone, or are so large enough as to make the proposed statement untenable. Types of Hypothesis Null hypothesis – the null hypothesis is denoted by Ho, it is the hypothesis of “no difference” and usually formulated for the purpose of being rejected. Alternative hypothesis – the alternative hypothesis is denoted by Ha or H1. This is the hypothesis that contradicts the hull hypothesis. If the null hypothesis is rejected, the alternative is being supported. The alternative hypothesis is the operational statement of the experimenter’s research hypothesis. Types of Errors Type I error – usually committed if the Ho is rejected when the Ho is true Type II error – usually committed if the Ho is accepted when the Ho is false In actual situation a given table below summarizes the kind of action and the type of error when one accepts or rejects a hypothesis. Status of Hypothesis Accept Ho Reject Ho Ho is True Correct Decision Type I error Ho is False Type II error Correct Decision One-sided and Two-sided Test Directional/Nondirectional Test In one-sided test the Ha specifies that the unknown population parameter is entirely above or entirely below the specified value of the Ho. It is called one-tailed or a directional test. While the two- sided test, the Ha specifies that the unknown population parameter can lie on either side of the value specified by Ho. It is called two-tailed or nondirectional test. The following are classified as one-tailed test Ho : µ = 100 Ha : µ < 100 Ho : µ = 100 Ha : µ > 100 The Ha is either entirely below 100 or entirely above 100 The following are classified as two-tailed test Ho : µ = 100 Ha : µ ‡ 100 Ho : µ1 = µ2 Ha : (µ1 - µ2) ‡ 0 The Ha can fall in either side of the Ho Note : For a directional test the inequality symbol of the Ha is less than (<) or greater than (>) while a non-directional test the symbol is not equal ( ‡ ). Testing Level of Significance The probability of committing type I error is called the level of significance or margin of error of the test and it is denoted by α (alpha), and one minus the level of significance is called confidence level. The probability of committing type II error is denoted by ß, and (1– ß) is called the power of the test. This will indicate the ability of the test statistics to determine correctly that the Ho is false, hence it should be rejected. Rather compute the actual chance of committing type I error, the researcher conventionally establish the level of significance before hand by considering the consequences of committing type I error. There are 2 most commonly used level of significance 0.05 and 0.01. At 0.05 level, the researcher is willing to accept a 5% chance of being wrong decision when Ho is rejected. At 0.01 level, the researcher is willing to accept a 1% chance of being wrong when Ho is rejected. If Ho is rejected at 0.05 level, then it is usually labeled as "significant”, otherwise the result is labeled “not significant”. If Ho is rejected at 0.01 level, then the result is labeled “Highly significant”. For a fixed sample size n, decreasing one type of error would mean increasing the other type of error. The only way to decrease both type of errors simultaneously is by increasing the sample size. The Critical Region The level of significance determines which values would be considered improbable or probable if the hypothesis were true. Thus, the range of possible values (sampling distribution) is divided into two sections or regions, the acceptance region (the probable values) and the rejection region (improbable values). The size of both region is completely specified by the level of significance. The acceptance region is equal to (1 – α) and the critical region or the rejection region is equal to α. The experimenter will decide to reject the null hypothesis only if the probability of observing of such an observed value is equal to or less than α. The size of the critical region is being determined by α, in general the location of the critical region is determined by the nature of the alternative hypothesis. The difference in the location of the critical region differentiates the statistical hypothesis into one-tailed or two-tailed test. Critical region is the set of all values of the test statistics that would cause to reject the null hypothesis. Basic Steps in Hypothesis Testing The following steps should be properly observed so as to make sure that the thinking is logical. 1. State the Ho and Ha, decide what data to collect and under what conditions

Basic Concepts of Hypothesis Testing (1)

Embed Size (px)

Citation preview

Page 1: Basic Concepts of Hypothesis Testing (1)

Basic Concepts of Hypothesis Testing

Introduction

A hypothesis is a statement or a tentative theory that may or may not be true, but is initially assumed to be true until new evidence suggests otherwise. It may be proposed

from a preliminary observation, a guess or based from previous experiences.

In hypothesis testing problem, the researcher has in mind a specific notion concerning the characteristics of the population under study before the sample data are

gathered. Then investigate the sample information to examine how consistent the data with the hypothesis in questioned. If the sample information deviate much from the stated

hypothesis, then researcher tend to disbelieved and reject the proposed statement. Although the proposed statement may be true, it is expected that any single sample (or samples)

will differ slightly from the true characteristic of the population and other will not, because of the sampling variation, have the same exact value as the population parameter. Hence,

differences between the sample information and the population under study might be due chance. The procedure of statistical test will provide the basis in deciding whether differences

between the sample observation and the hypothesized value could be due to sampling variation alone, or are so large enough as to make the proposed statement untenable.

Types of Hypothesis

Null hypothesis – the null hypothesis is denoted by Ho, it is the hypothesis of “no difference” and usually formulated for the purpose of being rejected.

Alternative hypothesis – the alternative hypothesis is denoted by Ha or H1. This is the hypothesis that contradicts the hull hypothesis. If the null hypothesis is rejected, the

alternative is being supported. The alternative hypothesis is the operational statement of the experimenter’s research hypothesis.

Types of Errors

Type I error – usually committed if the Ho is rejected when the Ho is true

Type II error – usually committed if the Ho is accepted when the Ho is false

In actual situation a given table below summarizes the kind of action and the type of error when one accepts or rejects a hypothesis.

Status of Hypothesis Accept Ho Reject Ho

Ho is True Correct Decision Type I error

Ho is False Type II error Correct Decision

One-sided and Two-sided Test

Directional/Nondirectional Test

In one-sided test the Ha specifies that the unknown population parameter is entirely above or entirely below the specified value of the Ho. It is called one-tailed or a directional

test. While the two- sided test, the Ha specifies that the unknown population parameter can lie on either side of the value specified by Ho. It is called two-tailed or

nondirectional test.

The following are classified as one-tailed test

Ho : µ = 100 Ha : µ < 100

Ho : µ = 100 Ha : µ > 100

The Ha is either entirely below 100 or entirely above 100

The following are classified as two-tailed test

Ho : µ = 100 Ha : µ ‡ 100

Ho : µ1 = µ2 Ha : (µ1 - µ2) ‡ 0

The Ha can fall in either side of the Ho

Note : For a directional test the inequality symbol of the Ha is less than (<) or greater than (>) while a non-directional test the symbol is not equal ( ‡ ).

Testing Level of Significance

The probability of committing type I error is called the level of significance or margin of error of the test and it is denoted by α (alpha), and one minus the level of significance is called

confidence level.

The probability of committing type II error is denoted by ß, and (1– ß) is called the power of the test. This will indicate the ability of the test statistics to determine correctly that the Ho

is false, hence it should be rejected.

Rather compute the actual chance of committing type I error, the researcher conventionally establish the level of significance before hand by considering the consequences of

committing type I error. There are 2 most commonly used level of significance 0.05 and 0.01. At 0.05 level, the researcher is willing to accept a 5% chance of being wrong decision

when Ho is rejected. At 0.01 level, the researcher is willing to accept a 1% chance of being wrong when Ho is rejected.

If Ho is rejected at 0.05 level, then it is usually labeled as "significant”, otherwise the result is labeled “not significant”. If Ho is rejected at 0.01 level, then the result is labeled “Highly

significant”.

For a fixed sample size n, decreasing one type of error would mean increasing the other type of error. The only way to decrease both type of errors simultaneously is by increasing the

sample size.

The Critical Region

The level of significance determines which values would be considered improbable or probable if the hypothesis were true. Thus, the range of possible values (sampling distribution) is

divided into two sections or regions, the acceptance region (the probable values) and the rejection region (improbable values). The size of both region is completely specified by the

level of significance. The acceptance region is equal to (1 – α) and the critical region or the rejection region is equal to α. The experimenter will decide to reject the null hypothesis

only if the probability of observing of such an observed value is equal to or less than α.

The size of the critical region is being determined by α, in general the location of the critical region is determined by the nature of the alternative hypothesis. The difference in the

location of the critical region differentiates the statistical hypothesis into one-tailed or two-tailed test.

Critical region is the set of all values of the test statistics that would cause to reject the null hypothesis.

Basic Steps in Hypothesis Testing

The following steps should be properly observed so as to make sure that the thinking is logical.

1. State the Ho and Ha, decide what data to collect and under what conditions

2. Specify the level of significance µ and the sample size n

3. Find the sampling distribution of the test statistics under the assumption that Ho is true

4. Establish the critical region for the test statistics

5. Computation of the test statistics, for a sample size n

6. Decision.

Z-test Statistics

Suppose that X1, X2, . . . Xn are sample observations from a normal populations with unknown mean and known variance. The appropriate test statistics in comparing the sample

mean and the population is

which is normally distributed with mean 0 and variance 1.

t-test Statistics

Page 2: Basic Concepts of Hypothesis Testing (1)

The population variance is generally unknown and is estimated by the variance of the random samples. The sampling variability of the sample variance may be affected if the sample

size is small (n less than or equal to 30). Hence, the unavailability of the population variance must take into consideration and to be estimated by the sample variance.

If the given observations X1, X2, . . ., Xn is a random sample from a normal distribution, but the population variance is unknown, then the test statistics

has a t-distribution with (n-1) degrees of freedom.

A t-distribution is symmetric probability distribution centered at zero, and looks similar but more variable (spread out) than the normal distribution. The t-distribution becomes

more and more similar with the normal distribution as the number of degree of freedom increases.

Sample Problems

1. A study shows that the average score of the applicants who took the entrance examination was 45 with a standard deviation of 5.15. Is there a reason to believe that the present

examinees is better than the previous results if a random sample of 36 applicants showed an average score of 47.34, use 0.01 level of significance.

ANSWER to Sample Problem 1

1. Ho : µ = 45 Ha : µ > 45

2. α = 0.01, n = 36

3. Test Statistics : Z-test

4. Critical Region : Reject the Ho if Zc > 2.33

5. Computations:

(47.36 – 45) V36

Zc = ———————— = 2.75

5.15

6. Decision: Since Zc > 2.33, therefore reject the Ho hypothesis and conclude that the new batch of applicants is better than the previous one.

2. A high school principal claims that the average performance of his graduating class in math was 83. To test this claim, 25 students were randomly selected from the recent

graduating class with the following results: 87, 85, 76, 83, 78, 90, 89, 85, 82, 77, 79, 76, 86, 83, 93, 88, 84, 76, 79, 85, 82, 81, 85, 84, 80. Test the principal's claim

using 0.05 level of significance.

ANSWER to Sample Problem 2

1. Ho : µ = 83 Ha : µ ≠ 83

2. α = 0.05, n = 25

3. Test Statistics : t-test

4. Critical Region : Reject the Ho if tc > 2.064

5. Computations: X = 82.92 S = 4.6 n = 25

__

(82.92– 83) V25

tc = ———————— = 2.75

4.6

6. Decision: Since tc < 2.064, therefore accept the Ho hypothesis and conclude that the claim of the principal is valid and the performance of new graduating class in Math is not

significantly different from the previous graduates.

Comparing Two Dependent Samples

In comparing two dependent samples, the data are considered as a paired values. This is a result of data being obtained from a certain “before and after” studies, a result from a pairs

of observation from two different populations, or a result from matching two subjects of similar characteristics to form a matched pairs. This pairs of observations are compared directly

to one another by using their observed differences.

The purpose of using correlated or dependent samples is to eliminate or remove the effect of uncontrolled factors which are not part but might influence the outcome of the study.

Matched pairs or pairing of observations will assure the researcher that the observed differences of the two samples was really due to the influences of the factors under study.

Test Statistics

The difference between two populations when dependent or correlated samples was used is almost the same with the t-test with singles samples in the previous module. The only

difference is that in dependent samples we will be dealing with the difference of two observed values rather than the original values.

Sample Problem/s

1. The following data represent the weights (in lbs.) of 10 obese  participants before and after undergoing  a two-weeks weight  reducing training program.

Participants 1 2 34

5 6 7 8 9 10

Before 275 250 235 212 215 263 289 258 215 249

After 250 215 218 198 200 245 260 250 202 230

Test the hypothesis that the mean weight loss of obese participants after the training program is 10 lbs. against the alternative that the loss     weight is greater than 10 lbs.  Use 0.01

level of significance.

2. A researcher wishes to determine if there is systematic difference between the readings of the two digital weighing scales.  The following data were obtained:

Sample No. 1 2 3 4 5 6 7 8

Scale A 50.082.5

53.8 85.4 75.4 63.5 35.8 25.3

Scale B 49.9 82.7 53.8 85.3 75.4 63.7 35.7 24.9

Use 0.05 level of significance to test whether there is no significant difference between the readings of the two scales. (the weights are express in grams).

Page 3: Basic Concepts of Hypothesis Testing (1)

Comparing Two Independent Samples

Sometimes it is impossible  to design a study or an experiment   which utilizes a matched or related samples in comparing two  populations.  Because  it is difficult to look for the

subjects or units with  more or less the same characteristics before the intervention or  application of treatments.   The researcher may use the two  independent samples by randomly

selecting the samples from the  two populations or by randomly assigning the subjects or units to the  different groups or treatments.   The samples size in an independent  population

need not necessarily be of the same size.

The parametric tests for analyzing data from two independent  samples are the z-test and t-test.  These test statistics assumes that the  data in both samples are normally distributed

and are usually in an  interval scale of measurement.

Z-test Statistics

Suppose that the observations X1, X2, ..., Xn1 and Y1, Y2, . . . , Yn2 are random samples from two independent populations. To test the hypothesis that the two population means are

equal. Then the appropriate test statistics is the Z-test. The formula of the test statistics is given by

which is normally distributed with mean 0 and variance 1.

However, if the population variances are unknown but the sample sizes are assumed to be large. The unknown population variances can be estimated by their corresponding sample

variances. Hence the Z-test statistics is given by

t-test  Statistics Equal Variance

Hypothesis testing about the differences of means between two independent populations will involved the t-distribution and the t-test statistics. When the two samples are independent,

and the two independent populations are normally distributed and the population variances are unknown but assumed to be equal.  The test statistics

has a t-distribution with (n-2) degrees of freedom.

Sample Problems

1.   A sample study was made by the Office of Student Affairs of the  weekly allowances of the student of a certain university.  If 60 students in the main campus averaged 250.00 pesos

with a standard  deviation of 15.75, while 40 off-campus students averaged 263.65 with  a standard deviation of 17.30, test at 0.05 level of significance whether  the difference

between these two sample means is significance.

Answer

1.   Ho :  μ1 = μ2            Ha :   μ1 ≠ μ2

2.   α  = 0.05,       n1 = 60       n2 = 40

3.   Test Statistics :     Z-test  

4.   Critical Region :   Reject the Ho if  IZcI > 1.96  

5.   Computations: x1 = 250.00     S1 = 15.75          x2 = 263.65     S2 = 17.32       Zc =  - 4.00        

6. Decision: Since IZcI >1.96, therefore  reject  the  Ho hypothesis and conclude that the two groups of students have different  Allowances  

2.   A classroom teacher wishes to compare the performance of students in statistics using two methods of teaching.  Two independent samples of sizes 15 and 10 were randomly

selected.   The following data have been obtained: 

Method A 85 83 76 78 82 81 86 75 77 83  

Method B 85 78 83 90 89 87 84 83 79 82 76 84 89 78 87

Is there a significant difference between the performance of students  in the two methods of teaching statistics? Use 0.05 level of significance.

ANSWER

Page 4: Basic Concepts of Hypothesis Testing (1)

1.   Ho :  μ1 = μ2            Ha :   μ1 ≠ μ2

2.   α  = 0.05,       n1 = 10       n2 = 15

3.   Test Statistics :     t-test (independent samples)

4.   Critical Region :   Reject the Ho if  I tcI > 2.069  

5.   Computations:  x1 = 80.60    S1 = 3.86                x2 = 83.60    S2 = 4.29 tc =  -1.753

6.  Decision:  Since I tcI < 2.069, therefore accept the  Ho hypothesis and conclude that the two methods have the same performance. 

Comparing More Than Two Samples

Introduction

In the preceding modules the statistical procedures being considered are the comparison of two independent or dependent normal populations. This module will considers the

procedure extended in comparing more than two independent samples. The statistical procedure is called the Analysis of Variance known as  ANOVA that uses a general methodology

and gives a test statistics for testing a hypothesis of equality of two or more means from an independent groups. The ANOVA is the general extension of t-test for independent samples.

Assumptions of ANOVA

The following are the assumptions of the Analysis of Variance

1. The population from which the samples were drawn are normally distributed.

2. The samples are independent from each other.

3. The variances of the different samples are homogeneous

Data LayoutSamples Group 1 Group 2 . . . Group p

1 X1 Y1 . Z1

2 X2 Y2 . Z2

3 . . . .

  . . . .

  Xn1 Yn2 . Znp

TOTALS T1 T2 . Tp

Outline ANOVA Table

Sources of Variation Degree of Freedom Sum of Square Mean Square Fc Ftab 0.05 Ftab 0.01

Between Groups p - 1 SSB MSB Fc ____ ____

Within Groups N - p SSW MSW . . .

Total N - 1 SST . . . .

N - Total Number of Samples                           MSB - Between Groups Mean Square

p - Number of Groups to be compared           MSW - Within Groups Mean Square

SST - Total Sum of Squares                             Fc - F computed

SSB - Between Groups Sum of Squares SSW - Within Groups Sum of Squares

Formula for Computations

Hypothesis Testing Procedure

1. Ho :  There is no significant difference between means

  Ha :  At least one mean is significantly different

2. Specify the level of significance and the sample sizes

3. Test Statistics : F-test (One-way ANOVA)

4. Critical Region : Reject Ho if : Fc > Ftab at 0.05 level of significance

5. Computations:   Construct an ANOVA Table

6. Decision :

Sample Problems

1.  The following data represent the scores of a random sample students in each section during the first long examination:

SectionSamples

Page 5: Basic Concepts of Hypothesis Testing (1)

A87 45 75 65 82

B78 56 66 49 56 45

C53 76 59 73 43 32 62

Is there a significant difference between the performance of students in the     three sections? Use 0.01 level of significance.

2. An animal science experiment was conducted to determine the effective feed formulation on the growth performance of pigs over a specified period. There  were four feed

formulation being considered and the following data were obtained: Feed Formulation Samples (kgs)

A 112.5 100.3 105.6 99.3 78.9

B 89.2 82.6 100.3 86.8 79.9 82.7

C 100.8 99.8 103.9 98.7 89.5

D 75.8 82.1 86.5 89.8 79.6 88.2 96.4

Is there a significant difference in the average growth these pigs for the different  feed formulation?  Use 0.05 level of significance.