You are on page 1of 35

SHAMEER P.

dept. of futures studies 2010-'12

Hypothesis Testing -Chi-Square Test

REWIND YOUR MIND


Hypothesis mere assumption to be proved or disproved normal question that intends to resolve tentative formulated for empirical testing tentative answer to research question point to start a research

dept. of futures studies 2010-'12

Research Questions and Hypotheses


Research question:
Non-directional:
No stated expectation about outcome

Example:

Hypothesis:
Statement of expected relationship
Directionality of relationship

Example:
Women will have greater conversational memory than men

dept. of futures studies 2010-'12

Do men and women differ in terms of conversational memory?

The Null Hypothesis


Null Hypothesis - the absence of a relationship
E..g., There is no difference between mens and womens with regards to conversational memories

Compare observed results to Null Hypothesis


How different are the results from the null hypothesis?

We do not propose a null hypothesis as research hypothesis - need very large sample size / power
Used as point of contrast for testing

dept. of futures studies 2010-'12

Hypotheses testing
When we test observed results against null:
We can make two decisions:
1. Accept the null
dept. of futures studies 2010-'12

No significant relationship Observed results similar to the Null Hypothesis

2. Reject the null


Significant relationship Observed results different from the Null Hypothesis

Whichever decision, we risk making an error

Type I and Type II Error


1. Type I Error
Reality: No relationship Decision: Reject the null
Believe your research hypothesis have received support when in fact you should have disconfirmed it Analogy: Find an innocent man guilty of a crime

2. Type II Error

Reality: Relationship Decision: Accept the null

Believe your research hypothesis has not received support when in fact you should have rejected the null. Analogy: Find a guilty man innocent of a crime

dept. of futures studies 2010-'12

Potential outcomes of testing


Decision Accept Null Reject Null

Relationship

Type II Error

Correct decision

dept. of futures studies 2010-'12

R E A L I T Y

No Relationship

Correct decision

Type I Error

Start by setting level of risk of making a Type I Error


How dangerous is it to make a Type I Error:
What risk is acceptable?:
5%? 1%? .1%?

Smaller percentages are more conservative in guarding against a Type I Error

Level of acceptable risk is called Significance level :


Usually the cutoff - <.05

dept. of futures studies 2010-'12

Steps in Hypothesis Testing


1) State research hypothesis 2) State null hypothesis 3) Decide the appropriate test criterion( eg. t test, 2 test, F test etc.) 4) Set significance level (e.g., .05 level) 5) Observe results 6) Statistics calculate probability of results if null hypothesis were true 7) If probability of observed results is less than significance level, then reject the null

dept. of futures studies 2010-'12

Guarding against Errors


Significance level regulates Type I Error Conservative standards reduce Type I Error:
.01 instead of .05, especially with large sample

Reducing the probability of Type I Error:


Increases the probability of Type II Error

Sample size regulates Type II Error


The larger the sample, the lower the probability of Type II Error occurring in conservative testing

dept. of futures studies 2010-'12

Methods used to test hypothesis


T test Z test F test 2 test ..

dept. of futures studies 2010-'12

Testing hypothesis for two nominal variables


Variables Gender Null hypothesis Passing is not related to gender Pass/Fail Procedure Chi-square
dept. of futures studies 2010-'12

Testing hypothesis for one nominal and one ratio variable


Variables Gender Null hypothesis Procedure T-test
dept. of futures studies 2010-'12

Score is not related to gender Test score

Testing hypothesis for one nominal and one ratio variable


Variable Year in school Null hypothesis
Score is not related to year in school

Procedure
ANOVA
dept. of futures studies 2010-'12

Test score
Can be used when nominal variable has more than two categories and can include more than one independent variable

Testing hypothesis for two ratio variables


Variable
Hours spent studying

Null hypothesis
Score is not related to hours spent studying

Procedure

Test score

dept. of futures studies 2010-'12

Correlation

Testing hypothesis for more than two ratio variables


Variable Hours spent studying Null hypothesis Procedure

Test score

dept. of futures studies 2010-'12

Classes missed

Score is positively related to hours spent studying and negatively related to classes missed

Multiple regression

dept. of futures studies 2010-'12

Chi square
2 (

) test

Used to:
Test for goodness of fit Test for independence of attributes Testing homogeneity Testing given population variance

dept. of futures studies 2010-'12

dept. of futures studies 2010-'12

Chi-Square Test of Independence

Introduction (1)
We often have occasions to make comparisons between two characteristics of something to see if they are linked or related to each other. One way to do this is to work out what we would expect to find if there was no relationship between them (the usual null hypothesis) and what we actually observe.

dept. of futures studies 2010-'12

Introduction (2)
The test we use to measure the differences between what is observed and what is expected according to an assumed hypothesis is called the chi-square test.

dept. of futures studies 2010-'12

For Example
Some null hypotheses may be: there is no relationship between the subject of first period and the number of students absent in our class. there is no relationship between the height of the land and the vegetation cover. there is no connection between the size of farm and the type of farm

dept. of futures studies 2010-'12

Important
The chi square test can only be used on data that has the following characteristics:

The data must be in the form of frequencies

The frequency data must have a precise numerical value and must be organised into categories or groups.

The expected frequency in any one cell of the table must be greater than 5. The total number of observations must be greater than 20.

dept. of futures studies 2010-'12

Contingency table
Frequency table in which a sample from a population is classified according to two attributes, which are divided in to two or more classes
DRUNKARDS GENDER 675 MALES 987 NON DRUNKARDS
dept. of futures studies 2010-'12

540

997

FEMALES

Degrees of Freedom
no of independent observations Number of cells no. of constraints
dept. of futures studies 2010-'12

Formula
2 = (O E)2
dept. of futures studies 2010-'12

2 = The value of chi square O = The observed value E = The expected value (O E)2 = all the values of (O E) squared then added together

Critical region:

dept. of futures studies 2010-'12

dept. of futures studies 2010-'12

Construct a table with the information you have observed or obtained.

Observed Frequencies (O)


dept. of futures studies 2010-'12

Money

Health

Love

Row Total
883 893 1776

men women Column total

82 46 128

446 574 1020

355 273 628

Work out the expected frequency.


Expected frequency = row total x column total Grand total
dept. of futures studies 2010-'12

money
men women Column Total 63.63 64.36 128

health
507.128 512.87 1020

love
312.23 315.76 628

Row Total
883 893 1776

For each of the cells calculate.

(O E)2 E
dept. of futures studies 2010-'12

money
Men women Column Total 5.30 5023

health
7.37 7.29

love
5.85 5.8

Row Total

2Calc. =
36.873

2Calc. = sum of all ( O-E)2/ E values in the cells. Here 2Calc. =36.873
dept. of futures studies 2010-'12

Find 2critical From the table with degree of freedom 2 and level of significance 0.05 2Critical =5.99

2 table

dept. of futures studies 2010-'12

Conclusion
Compare 2Calc. and 2critical obtained from the table

dept. of futures studies 2010-'12

If 2Calc. Is larger than 2Critical. then reject null hypothesis and accept the alternative Here since 2Calc. is much greater than 2Critical, we can easily reject null hypothesis that is ; there lies a relation between the gender and choice of selection.

Reference
RESEARCH METHODOLGIES
- L R Potti
dept. of futures studies 2010-'12