Chi Square Test X2.

Slides:



Advertisements
Similar presentations
Chi-square, Goodness of fit, and Contingency Tables
Advertisements

CHI-SQUARE(X2) DISTRIBUTION
Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Associations Let’s do the  2  dance It’s a question of frequency.
Tutorial: Chi-Square Distribution Presented by: Nikki Natividad Course: BIOL Biostatistics.
Hypothesis Testing IV Chi Square.
Chapter 13: The Chi-Square Test
Ch 15 - Chi-square Nonparametric Methods: Chi-Square Applications
You would not go and count every single flower
11-3 Contingency Tables In this section we consider contingency tables (or two-way frequency tables), which include frequency counts for categorical data.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
Presentation 12 Chi-Square test.
Goodness-of-Fit Tests and Categorical Data Analysis
1 Level of Significance α is a predetermined value by convention usually 0.05 α = 0.05 corresponds to the 95% confidence level We are accepting the risk.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
For testing significance of patterns in qualitative data Test statistic is based on counts that represent the number of items that fall in each category.
Two Variable Statistics
Maximum Likelihood Estimator of Proportion Let {s 1,s 2,…,s n } be a set of independent outcomes from a Bernoulli experiment with unknown probability.
1 In this case, each element of a population is assigned to one and only one of several classes or categories. Chapter 11 – Test of Independence - Hypothesis.
Slide 26-1 Copyright © 2004 Pearson Education, Inc.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © Dr. John Lipp.
+ Chi Square Test Homogeneity or Independence( Association)
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Sampling  When we want to study populations.  We don’t need to count the whole population.  We take a sample that will REPRESENT the whole population.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 2 methods.
4 normal probability plots at once par(mfrow=c(2,2)) for(i in 1:4) { qqnorm(dataframe[,1] [dataframe[,2]==i],ylab=“Data quantiles”) title(paste(“yourchoice”,i,sep=“”))}
Chapter Outline Goodness of Fit test Test of Independence.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Chapter 15 The Chi-Square Statistic: Tests for Goodness of Fit and Independence PowerPoint Lecture Slides Essentials of Statistics for the Behavioral.
1 Chi-square Test Dr. T. T. Kachwala. Using the Chi-Square Test 2 The following are the two Applications: 1. Chi square as a test of Independence 2.Chi.
CHAPTER INTRODUCTORY CHI-SQUARE TEST Objectives:- Concerning with the methods of analyzing the categorical data In chi-square test, there are 3 methods.
Chi-Square Test (χ 2 ) χ – greek symbol “chi”. Chi-Square Test (χ 2 ) When is the Chi-Square Test used? The chi-square test is used to determine whether.
Chi Squared Statistical test used to see if the results of an experiment support a theory or to check that categorical data is independent of each other.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
Chapter 11 Chi Square Distribution and Its applications.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Statistics for Psychology CHAPTER SIXTH EDITION Statistics for Psychology, Sixth Edition Arthur Aron | Elliot J. Coups | Elaine N. Aron Copyright © 2013.
Quadrat Sampling Chi-squared Test
Test of independence: Contingency Table
Chapter 11 – Test of Independence - Hypothesis Test for Proportions of a Multinomial Population In this case, each element of a population is assigned.
Chi-Square hypothesis testing
Presentation 12 Chi-Square test.
5.1 INTRODUCTORY CHI-SQUARE TEST
Lecture Slides Elementary Statistics Twelfth Edition
Chapter Fifteen McGraw-Hill/Irwin
Chapter 12 Tests with Qualitative Data
Data Analysis for Two-Way Tables
Chapter 11 Goodness-of-Fit and Contingency Tables
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Econ 3790: Business and Economics Statistics
Reasoning in Psychology Using Statistics
Statistical Inference about Regression
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables: Independence and Homogeneity
ECOSYSTEMS & ENERGY FLOW
CHI SQUARE TEST OF INDEPENDENCE
Analyzing the Association Between Categorical Variables
Hypothesis Tests for a Standard Deviation
11E The Chi-Square Test of Independence
Ecosystems & Energy Flow ( )
Chapter Outline Goodness of Fit test Test of Independence.
Quadrat sampling & the Chi-squared test
Quadrat sampling & the Chi-squared test
Presentation transcript:

Chi Square Test X2

Chi Square is a test used to see if two pieces of data are significantly different or due to chance In Biology, we use this test a lot to see if our data is significant. In a population lab, we would see if 2 species found are associated with each other

Quadrant Sampling This method is only suitable for plants and other organisms that are not motile. Choose a random number to determine the length and width of your area If the absence or presence of more than one species is recorded in every quadrat during sampling of a habitat, it is possible to test for an association between species.

A quadrat is a wire shaped into a square of a known size , such as 10x10 meters or 100m2. If you want to know the population size of two plant species, take random samples of this area by throwing down the quadrat and recording the population numbers in each subunit of the quadrat.

Setting up quadrats Setting up quadrats This is a grid of 100 quadrats, each 10 m on a side. http://www.csulb.edu/~rodrigue/geog200/lab4.html; Dr.Rodrigue http://home.iae.nl/users/isse/Files/environmental_systems.htm; Environmental Systems

Count how many individuals there are inside the quadrat of the plant population being studied. Repeat steps 2 and 3 as many times as possible. Measure the total size of the area occupied by the population, in square meters. http://www.waite.adelaide.edu.au/school/Habitat/survey.html; Survey of native and exotic species

Calculate the mean number of plants per quadrat Calculate the mean number of plants per quadrat. Then calculate the estimated population size using the following equation: Population size = mean number per quadrat X total area area of each quadrat

Populations are often unevenly distributed because some parts of the habitat are more suitable for a species than others. If two species occur in the same parts of a habitat, they will tend to be found in the same quadrats. This is known as a Positive association

H0 -Two species are distributed independently There are 2 hypotheses: H0 -Two species are distributed independently The Null Hypothesis H1 – Two species are associated (either positively so they tend to occur together or negatively so they tend to occur apart) We can test these hypotheses using a statistical procedure – the chi square test

Method for Chi Square Draw up a contingency table of observed frequencies. Species A present Species A absent Row totals Species B present Species B absent Column totals

Calculate the row and column totals. Adding the row and column totals should give the same grand total in the lower right cell.

Calculate the expected frequencies, assuming the independent distribution for each of the four species combinations. Each expected frequency is calculated from values on the contingency table using this equation. Expected frequency = row total x column total grand total

Calculate the degree’s of freedom using this equation: DF = (m-1)(n-1) Where m and n are the number of rows and columns in the contingency table

Find the critical region for chi-squared from a table of chi-square values, using the degrees of freedom that you calculated. It should have a significance level (p) of 0.05 (5%)

X2 = Σ 𝑜−𝑒 2 e O – observed e- expected Σ- the sum of Calculate the chi-squared using this equation: X2 = Σ 𝑜−𝑒 2 e O – observed e- expected Σ- the sum of

What is statistically significant H0 - the null hypothesis with the belief that there is no relationship between the two H1 – There is a relationship The usual procedure is to test the null hypothesis with the expectation of showing that it is false. If you say that the results were statistically significant, it means that if the null hypothesis was true, the probability of getting results as extreme as the oberved results would be very small.

example In a certain town, there are about one million eligible voters. A simple random sample of 10,000 eligible voters were chosen to study the relationship between sex and participation in the last election. The results are summarized in the following 2x2 contingency table: Men Women Voted 2792 3591 Didn’t vote 1486 2131

We want to check whether being a man or a woman (columns) is independent of having voted in the last election (rows). In other words is ‘sex and voting independent’? Null – sex is independent of voting Alternative – sex and voting are dependent

We now need to complete our contingency table. Men Women Total voted 2792 3591 6383 Didn’t vote 1486 5722 3617 4278 10000

Expected Table Men Women Total Voted 2731 3652 6383 Didn’t vote 1547 2070 3617 Totals 4278 5722 10000 Remember: expected frequencies = row totals x column totals grand total So: 6383 x 4278 / 10000 = 2731 6383 x 5722 / 10000 = 3652

Now we have the observed table and the expected table under the null hypothesis of independence. Now we need to compute X2 (O – e)2 e

So….. (2792 – 2731)2 = 1.36 2731 (3591 – 3652)2 = 1.0 3652 Etc . X2 = 1.4+1.0+2.4+1.8 = 6.6 Degrees of freedom 2 – 1 = 1

Since X2 is 6.6 which has a p value of 1%, we have to reject the NULL hypothesis. The data supports the hypothesis that sex and voting are dependent in this town.

http://www. youtube. com/watch http://www.youtube.com/watch?v=WXPBoFDqNVk&safety_mode=true&persist_safety_mode=1