+ All Categories
Home > Education > Hypothesis Testing

Hypothesis Testing

Date post: 08-Apr-2017
Category:
Upload: kalyan-acharjya
View: 65 times
Download: 0 times
Share this document with a friend
17
Hypothesis Testing Kalyan Acharjya [email protected]
Transcript
Page 1: Hypothesis Testing

Hypothesis Testing

Kalyan [email protected]

m

Page 2: Hypothesis Testing

Outlines●What is Hypothesis?

●Characteristics of Hypotheses.

●Hypotheses Types & Terminologies.

●Null & Alternate Hypotheses.

●Flowchart of Hypotheses Testing.

●Chi-Square Test.

●Conclusion.2

Page 3: Hypothesis Testing

What is Hypothesis?●A Hypothesis is a premise or claim that we want to test.

●Hypothesis (Latin)= Hupo (Under)+Thesis (placing)-Greek.

●A supposition or proposed explanation made on the basis of limited evidence as a starting point for further investigation.

●A hypothesis is a speculation or theory based on insufficient evidence that lends itself to further testing and experimentation.

●Presume assumption based on observations or experiences (Not Verified). 3

Page 4: Hypothesis Testing

Characteristics of Hypothesis●Hypothesis should be clear & precise.●Hypothesis should be capable of being tested.●Hypothesis must explain the facts that give rise to the need for

explanation.●Hypothesis should be amenable to testing within a reasonable time.●Hypothesis should be consistent with most known facts.●Hypothesis should state relationships between variables.

4

Page 5: Hypothesis Testing

Hypothesis Types★Null Hypothsis

★Alternate Hypothesis / Research Hypothesis

A Null Hypothesis (Ho) - that says there is no statistical significance between the two variables in the hypothesis.

When the samples result donot support the null hypothesis, then concluded something else is true, termed as Alternate Hypothesis (Ha).

5

Page 6: Hypothesis Testing

Hypothesis Testing Flowchart

Hypothesis

Significance

Sample Values

Testing Method

P Value

Decision

6

Page 7: Hypothesis Testing

Some TerminologiesThe level of Confidence (C): Probability of confidence (May be Null Hypothesis likely to be reject).

The level of Significance (alpha) - The probability of rejecting the null hypothesis when it is true. Normally referred in percentage (usually 5%).

Decision Rule-Test Hypothesis - The decision rule compares the sample mean to the hypothesized mean. If the sample mean is "close" to the hypothesized mean, we accept the null hypothesis.

Type I & Type II error:

7

Page 8: Hypothesis Testing

8

Two Tailed & One Tailed Test

Page 9: Hypothesis Testing

Some Terminologies..ContinueAnalyze Sample Data: Degrees of freedom, expected frequencies, test statistic, and the P-value associated with the test statistic.

• Degrees of freedom. The degrees of freedom (DF) is equal to:

DF = (r - 1) * (c - 1)

where r is the number of levels for one categorical variable, and c is the number of levels for the other categorical variable.

• Expected frequencies: Er,c = (nr * nc) / n, where Er,c is the expected frequency count for level r of Variable A and level c of Variable B, nr is the total number of sample observations at level r of Variable A, nc is the total number of sample observations at level c of Variable B, and n is the total sample size. 9

Page 10: Hypothesis Testing

Test statistic: Chi Square Test • The test statistic is a chi-square random variable (chi square)

defined by the following equation-

P-value: The P-value is the probability of observing a sample statistic as extreme as the test statistic (Variable and degrees of freedom on Chi-Square Distribution).

Interpret Results: When P value < alpha (Level of significance) implies null hypothesis is rejected.

10

EEO 2)(2

Page 11: Hypothesis Testing

Chi-Sqaure Test-Example• “Is Demonetization will help to boost the Indian Economy?” Opinion poll surveyed a simple

random sample of 1000 people. Respondents were classified by gender (male or female) and by voting preference (Yes, No, or Neutral). Results-

• Is there a gender gap? Do the men's preferences differ significantly from the women's preferences? Use a 0.05 level of significance.

Poll ResultsRow Total

Yes No Neutral

Male 200 150 50 400

Female 250 300 50 600

Column total 450 450 100 1000

11

Page 12: Hypothesis Testing

Chi-Sqaure Test-Solutions Contd..• State the Hypotheses: The first step is to state the null hypothesis and an alternative

hypothesis.

H0: Gender and voting preferences are independent.

Ha: Gender and voting preferences are not independent.

• Formulate an analysis plan. For this analysis, the significance level is 0.05. Using sample data, we will conduct a chi-square test for independence.

12

Page 13: Hypothesis Testing

Numerical Continue..• Analyze sample data: Compute the degrees of freedom, the

expected frequency counts, and the chi-square test statistic.

DF = (r - 1) * (c - 1) = (2 - 1) * (3 - 1) = 2

E r,c = (nr * nc) / nE1,1 = (400 * 450) / 1000 = 180000/1000 = 180E1,2 = (400 * 450) / 1000 = 180000/1000 = 180E1,3 = (400 * 100) / 1000 = 40000/1000 = 40E2,1 = (600 * 450) / 1000 = 270000/1000 = 270E2,2 = (600 * 450) / 1000 = 270000/1000 = 270E2,3 = (600 * 100) / 1000 = 60000/1000 = 60

= Σ [ (Or,c - Er,c)2 / Er,c ]

= (200 - 180)2/180 + (150 - 180)2/180 + (50 - 40)2/40 + (250 - 270)2/270 + (300 - 270)2/270 + (50 - 60)2/60= 16.2

where DF is the degrees of freedom, r is the number of levels of gender, c is the number of levels of the voting preference, nr is the number of observations from level r of gender, nc is the number of observations from level c of voting preference, n is the number of observations in the sample, Er,c is the expected frequency count when gender is level r and voting preference is level c, and Or,c is the observed frequency count when gender is level r voting preference is level c.

13

Poll ResultsRow TotalYes No Neutral

Male 200 150 50 400Female 250 300 50 600Column

total 450 450 100 1000

2

22

Page 14: Hypothesis Testing

Numeric Continue…Based on the chi-square statistic and the degrees of freedom, we determine the P-value.

The P-value is the probability that a chi-square statistic having 2 degrees of freedom is more extreme than 16.2.

By using the Chi-Square Distribution Calculator to find P( > 16.2) = 0.0003.

Results: Since the P-value (0.0003) is less than the significance level (0.05), we cannot accept the null hypothesis. Thus, we conclude that there is a relationship between gender and voting preference.

Null Hypothesis is rejected. 14

2

Page 15: Hypothesis Testing

Conclusions:• The outcome of the research is based on formulation of hypothesis.

• Hypothesis testing is a significant part of any research work.

• The objective of Hypothesis Testing to verify the Null Hypotheses, not prove it.

• Chi-square is one statistic use to find the P value (Hypothesis Testing).

• If P Value is less than level of significance, then reject the null hypothesis.

• The other most popular test statistics are z2 test and t test.15

Page 16: Hypothesis Testing

References: Book:

Website link (Numeric Example)

http://stattrek.com/chi-square-test/independence.aspx?Tutorial=AP

16

Page 17: Hypothesis Testing

Thank You

17

Kalyan Acharjya

[email protected]


Recommended