+ All Categories
Home > Documents > 1 Hypothesis testing. 2 A common aim in many studies is to check whether the data agree with certain...

1 Hypothesis testing. 2 A common aim in many studies is to check whether the data agree with certain...

Date post: 22-Jan-2016
Category:
Upload: gianna-sherer
View: 221 times
Download: 0 times
Share this document with a friend
16
1 Hypothesis testing
Transcript
Page 1: 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

Hypothesis testing

Page 2: 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.

2

Hypothesis testingA common aim in many studies is to check whether the data agree with certain predictions. These predictions are hypotheses about variables measured in the study.A hypothesis is a statement about some characteristic of a variable or a collection of variables.A significance test is a way of statistically testing a hypothesis by comparing the data to values predicted by the hypothesis. Data that fall far from the predicted values provide evidence against the hypothesis. All significance tests have five elements: assumptions, hypotheses, test statistic, p-value, and conclusion.All significance tests require certain assumptions for the tests to be valid. These assumptions refer, e.g., to the type of data, the form of the population distribution, method of sampling, and sample size.

Page 3: 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.

3

Hypothesis testing

Exmple: a firm produces metal boxes and wants to evaluete the production process. They want to be sure that the longest side of the box is 368 mm. They keep a sample of 25 boxes. If the length of the side would result different, the all production process will need a correction.

Page 4: 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.

4

Hypothesis testingA significance test considers two hypotheses about the value of a population parameter: the null hypothesis and the alternative hypothesis.

The null hypothesis H0 is the hypothesis that is directly tested. This is usually a statement that the parameter has value corresponding to, in some sense, no effect. The alternative hypothesis Ha is a hypothesis that contradicts the null hypothesis. This hypothesis states that the parameter falls in some alternative set of values to what null hypothesis specifies.

Page 5: 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.

Hypothesis testing

A significance test analyzes the strength of sample evidence against the null hypothesis. The test is conducted to investigate whether the data contradict the null hypothesis, hence suggesting that the alternative hypothesis is true. The alternative hypothesis is judged acceptable if the sample data are inconsistent with the null hypothesis. That is, the alternative hypothesis is supported if the null hypothesis appears to be incorrect. The hypotheses are formulated before collecting or analyzing the data.

The test statistics is a statistic calculated from the sample data to test

the null hypothesis. This statistic typically involves a point estimate of the parameter to which the hypotheses refer.

Page 6: 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.

6

Hypothesis testingThe sample distribution of the test statistics is divided into two regions:

•Region of rejection

•Region of acceptance

Decision rule:

Value of test statistics

Falls in region of acceptance Falls in region of rejection

Null hypothesis cannot be rejected Null hypothesis must be rejected

Page 7: 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.

7

Hypothesis testingTo decide on the null hypothesis, we need to find the critic value of the test statistics.

This is the value that divide the acceptance and rejection region

Rejection region

Rejection region

Acceptance region

Critic value

Critic value

Page 8: 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.

Hypothesis testing

The p-value is the probability, if H0 were true, that the test statistic would fall in this collection of values.

The p-value is the probability, when H0 is true, of a test statistic value at least as contradictory to H0 as the value actually observed.

The smaller the p-value, the more strongly the data contradict H0.

For example, a p-value such as 0.3 or 0.8 indicates that the observed data would not be unusual if H0 were true. But a p-value such as 0.001 means that such data would be very unlikely, if H0 were true. This provides strong evidence against H0.

Page 9: 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.

9

Test for the mean (known variance)

To verify that the mean of a population is equal to a certain value μ, against the alternative hypotheasis of a value different from it, if we know σ, we can use the test statistics Z:

X is distributied as a Normal => under H0, Z is distributed as a standardised normal

If Z has values near 0 we can accept H0, else we refuse H0 (two side test).

Page 10: 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.

10

Test for the mean (known variance)

Critical value approach (level of significance of 0.05)

Decision rule:

Refuse H0

if Z>+1,96 or

if Z<-1,96

else

accept H0

Rejection region

Rejection region

Acceptance region

Critic value

Critic value

Page 11: 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.

11

Test per la media (varianza nota)

Example: a firm produces metal boxes and wants to evaluete the production process. They want to be sure that the longest side of the box is 368 mm. They keep a sample of 25 boxes. The standard devistion id 15 mm and the sample mean is 372,5 mm.

H0: μ = 368

H1: μ ≠ 368

With the value of the test statistics, H0 cannot be refused.

Rejection region

Rejection region

Acceptance region

Page 12: 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.

12

P-value approach

Decision rule:

• if the p-value greather than or equal to , null hypothesis is accepted.

• if the p-value è is less than , the null hypothesis is rejected.

Page 13: 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.

13

Test for the mean (unknown variance)

Usually we do not know σ and we estimate it through S.

In this case the test statistics to be use is t:

Also in this case we can use the critic value approach or the p-value one. The tables to be used are the t-Student’s ones.

It has the Student’s t distribution with n − 1 degrees of freedom if H0 is true.

Page 14: 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.

14

Test for the mean (unknown variance)

Example: t with a level of significance 0.05 and 11 degree fo freedom

Rejection region

Rejection region

Acceptance region

Critic value

Critic value

Page 15: 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.

15

Test for the mean (unknown variance)

Example: The following data are the amounts in dollars in a random sample of 12 sales invoices.

108.98 152.22 111.45 110.59 127.46 107.26

93.32 91.97 111.56 75.71 128.58 135.11

1 112.85

n

ii

XX

n 2

1 20.801

n

ii

X XS

n

112.85 1201.19

20.80

12

Xt

S

n

H0: μ=120 H1:μ≠120 α=0.05

Page 16: 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.

16

…Example

Since -2.201<t=-1.19<2.201 we do not reject H0.


Recommended