Presentation is loading. Please wait.

Presentation is loading. Please wait.

Non-Parametric Statistics Part I: Chi-Square

Similar presentations


Presentation on theme: "Non-Parametric Statistics Part I: Chi-Square"— Presentation transcript:

1 Non-Parametric Statistics Part I: Chi-Square

2 x2 Operates on FREQUENCY Data
Suppose we have a plot of land on which we hope to harvest wood. Maple is more valuable than Oak and Oak more valuable than pine. We take a sample of the trees (the whole plot is too big) and we ask whether there are significantly unequal amounts of each type (a=.05). Pine Maple Oak # of trees 145 301 289 We cannot get a mean from these data but there are clear differences between the amounts in each category. This is categorical or nominal data experessed as frequencies. So we use the x2

3 x2 : Homogeneity = (145 + 301 + 289)/3 = 245 245 245 245
What are the null and alternative hypotheses? H0: The groups do not have different frequencies. H1: The groups do have different frequencies. Find the critical value: x2 table (k-1 df = 3-1= 2) = 5.99 Calculate the obtained statistic: Pine Maple Oak # of trees observed 145 301 289 # of trees expected = ( )/3 = 245 = 61.52 Make a decision: Our obtained value is larger than our critical value. Reject the null; the groups do have different frequencies.

4 x2 : Homogeneity Example
Is political affiliation distributed equally in our class? (use alpha=.01) What are the null and alternative hypotheses? H0: The groups do not have different frequencies. H1: The groups have different frequencies. Find the critical value: x2 table (k-1 df = 3-1= 2) = 9.21 Calculate the obtained statistic: Democrat Republican Other # of people observed 10 15 5 = ( )/3 = 10 # of people expected = 5 Make a decision: Our obtained value is smaller than our critical value. Retain the null; the groups do not have different frequencies.

5 x2 : Goodness of Fit Pine proportion = 255/473 = 0.54 Maple proportion = 115/473 = 0.24 Oak proportion = 103/473 = 0.22 Pine expected = 0.54(735) = 396.9 Maple expected = 0.24(735) = 176.4 Oak expected = 0.22(735) = 161.7 Five years ago the tree-lot was also sampled. Has the composition of the lot changed since then (use alpha=.05)? We need a different expected value based on the previous sample. Pine Maple Oak # trees 2014 145 301 289 Total # 735 473 Pine Maple Oak # trees 2009 255 115 103 Notice we’re trying to compare the frequencies from two time points, but the total # of trees categorized in 2014 is different from the 2009 total! Pine Maple Oak # trees expected 396.9 176.4 161.7

6 x2 : Goodness of Fit Example
What are the null and alternative hypotheses? H0: The composition of the lot has not changed. H1: The composition of the lot has changed. Find the critical value: x2 table (k-1 df = 3-1= 2) = 5.99 Calculate the obtained statistic: Pine Maple Oak # trees 2014 145 301 289 Pine Maple Oak # trees expected 396.9 176.4 161.7 = Make a decision: Our obtained value is larger than our critical value. Reject the null; the composition of the lot has changed.

7 x2 : Independence Pine Maple Oak
Mirkwood Old Forest H0: Tree type and Forest are independent. H1: Tree type and Forest are not independent.

8 x2 : Independence Example
(assume alpha=.05) What are the null and alternative hypotheses? H0: Tree type and forest are independent. H1: Tree type and forest and not independent. Find the critical value: df for this test is (r-1)(c-1) We have 2 rows and 3 columns, so (2-1)(3-1) = 2 x2 table (df = 2) = 5.99 Calculate the obtained statistic:

9 How to calculate expected values:
x2 : Independence How to calculate expected values: Pine Maple Oak Mirkwood Old Forest R 702 798 356 C Grand Total: 1500 Expected value = (R x C)/ grand total Expected Mirkwood-Pine = (702 x 356)/1500 = Expected Old Forest-Pine = (798 x 356)/1500 =

10 S x2 : Independence Observed Values Expected Values Pine Maple Oak
Mirkwood Old Forest Pine Maple Oak Mirkwood Old Forest ( O - E)2 x2 = E S = 28.18

11 x2 : Independence Example
(assume alpha=.05) What are the null and alternative hypotheses? H0: Tree type and forest are independent. H1: Tree type and forest and not independent. Find the critical value: df for this test is (r-1)(c-1) We have 2 rows and 3 columns, so (2-1)(3-1) = 2 x2 table (df = 2) = 5.99 Calculate the obtained statistic: 28.18 Make a decision: Our obtained value is larger than our critical value. Reject the null; tree type and forest are not independent.


Download ppt "Non-Parametric Statistics Part I: Chi-Square"

Similar presentations


Ads by Google