discussion 4

alison12
B.Chapter17Salkind-NC.ppt

Chapter 17 (Salkind)

What To Do When You’re Not Normal

Overview of this Chapter

  • The Good News and the Bad News

First up, the Bad News. Once again, we will look at statistics. Here, that means the Chi Square, a type of statistics we rely on when our scales are nominal or ordinal

The other Bad News is that this there are formulas and tables associated with this chapter. I know, ugh

The Good News? Some of this might be a review! But you will need some of the new information here as you work on one statistical calculation for your research paper: The Chi Square

Overview of this Chapter

  • In this chapter, we will focus on …

Part One: Introduction To Non-Parametric Statistics

Part Two (A): Introduction To The One-Sample Chi-Square

Part Two (B): Chi Square Test Of Independence

Part Three: Computing The Chi-Square Statistic

Part Four: Using The Computer To Perform A Chi-Square Test

Part Five: Other Non-Parametric Tests You Should Know

Part Six: An Eye Toward The Future

Part One

Introduction To Non-Parametric Statistics

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

Last semester in Research Methods and Design One (and last week in Chapter 9, Smith and Davis), we talked about normal curves and why we need normality in order to run ANOVAs, t-Tests, and other “parametric” tests.

“Parametric tests” infer that the results obtained from a sample in the study easily applies to a population from which that sample was drawn. But such “normal” tests are based on a series of assumptions …

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

Four parametric test assumptions:

Assumption #1: Variances in each group are homogenous (that is, the two or more groups are similar in variability)

Assumption #2: The sample is large enough to adequately represent the population (e.g. it isn’t a biased sample)

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

Four parametric test assumptions:

Assumption #3: The statistical test uses interval or ratio scales of measurement (the I and R in NOIR)

Assumption #4: The characteristic under consideration is normally distributed (i.e. has a normal curve)

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

So what happens when/if a test violates these assumptions?

In some cases, t-Tests, ANOVAs, and other parametric tests are robust (e.g. strong enough) that the assumptions can be violated without too much hassle.

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

So what happens when/if a test violates these assumptions?

Non-parametric tests may be used when assumptions are violated

“Non-parametric” statistics are essentially distribution-free, meaning they don’t follow the same rules as the parametric tests

They don’t require homogeneity of variance and they can examine more than just interval and ratio data

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

So what happens when/if a test violates these assumptions?

Researchers often use non-parametric statistics used when the data set relies on frequencies or percentages (rather than scales), and we can test whether the percentages we see in a data set are what we would expect by chance alone

This takes us to one of the more common non-parametric tests, the chi square (something you’ll use for your first study this semester!)

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

Before we get too far into this chapter, I just want you to think about the concept of “expectations”

Let’s say I go to a pet store to look at kittens, and there are dozens of them. Just looking at them from afar, what percent would you expect to be female?

About a 50 / 50 chance, right? Although we might “expect” this, we might be wrong. Chi Squares can help us see if our expectations match reality!

Pop Quiz – Quiz Yourself

  • If you have 30 respondents identifying their political preference (i.e., Democrat, Republican, Independent), how many of each political affiliation would you expect?

A). 10

B). 20

C). 30

D). 40

Pop Quiz – Quiz Yourself

  • If you have 30 respondents identifying their political preference (i.e., Democrat, Republican, Independent), how many of each political affiliation would you expect?

A). 10

B). 20

C). 30

D). 40

Maybe, right? We SHOULD get 10 of each, but in reality there tend to be very few Independents (voters usually fall into either Democrat or Republican camps, so “10” might be too high for Independents!)

Introduction - Non-Parametric Statistics

  • Introduction To Non-Parametric Statistics

In the next part of this presentation, I want to tell you about two different types of chi squares we can run. We will split them up into two “flavors”:

Part Two (Section A): The One-Sample Chi Square

This one is more FYI (though you will be tested on it!

Part Two (Section B): Chi Square Test of Independence

This one is very important for your Paper II analysis!

We’ll figure out how to compute each when we start Part Three

Part Two (Section A)

Introduction To The One-Sample Chi-Square

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

The one sample chi-square is a non-parametric test that allows you to determine if what you observe in a frequency distribution of scores is what you would expect by chance, though this is limited to a single sample

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

The one sample chi-square is a non-parametric test that allows you to determine if what you observe in a frequency distribution of scores is what you would expect by chance, though this is limited to a single sample

Consider ”year in college” as our “one sample” for students at FIU. For expectations, we ask, “What percent represents Freshmen, Sophomores, Juniors, and Seniors?” We can then compare our “expectations” to our “observations.”

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

We would probably expect a few more Freshmen than other groups, right? After all, not all Freshmen will return for their senior year, and not all Sophomores return as Juniors, etc.

But generally, let’s say we expect around 25% of each class each year. If we look at the actual observations, would they be higher or lower than what we would “expect” by chance?

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

That’s a question we can answer using the chi square

At FIU, our total enrollment is around 50,000

So we might expect around 12,500 Freshmen (or one fourth of the total enrollment)? What if we found 15,000 Freshmen? Would that be outside the realm of expectation?

FIU has a retention rate of 84% of Freshmen (84% of Freshmen return as Sophomores), which is high but still shows that some students are not “retained”

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

That’s a question we can answer using the chi square

The chi square tests the actual occurrences against the expected occurrences to see if they differ significantly

This means that if there is no difference between what we observe and what we would expect by chance, our chi square will be close to zero

Pop Quiz – Quiz Yourself

  • If you have 100 respondents identify their region of residence (i.e., north, south, east, or west), what would the expected frequency be for each category?

A). 33

B). 50

C). 25

D). 100

Pop Quiz – Quiz Yourself

  • If you have 100 respondents identify their region of residence (i.e., north, south, east, or west), what would the expected frequency be for each category?

A). 33

B). 50

C). 25

D). 100

But again, expectation and reality may differ a lot!

Introduction: One-Sample Chi-Square

  • Introduction To One-Sample Chi-Square

What is the one-sample chi-square all about?

As you can see, the one-sample chi square focuses on just one variable, or one sample

Here, we looked at the number of students who fall into each year (Freshmen, Sophomore, Junior, or Senior)

But what if we want to look at more than one variable? Well, that calls for a chi square test of independence …

Part Two (Section B)

The Chi-Square Test Of Independence

The Chi-Square Test Of Independence

  • The Chi Square Test Of Independence

As you just saw, we can see if the observed counts of a single variable match (or do not match) the counts we would expect by chance

Often, though, you will also want to see if the observed counts across two variables match (or mismatch) the counts we would expect by chance. In this situation, you use a chi square test of independence (two samples)

The Chi-Square Test Of Independence

  • The Chi Square Test Of Independence

Go back to our Freshmen, Sophomore, Junior, and Seniors at FIU. Do you think there is a difference in terms of percentages of students in each year?

We could answer this using a one-sample chi square

But do you think there might also be a difference for each of these classes between male and female students?

This question deals with two samples (year and gender), so we must answer it using a chi square test of independence

The Chi-Square Test Of Independence

  • The Chi Square Test Of Independence

Given four “years” (Freshmen, Sophomore, Junior, and Senior) and two “genders” (Male and Female), we might expect 12.5% of students to fall into each of our eight table cells:

Will our “observations” match our “expectations”? Let’s find out

Gender Year in College
Freshman Sophomore Junior Senior
Male 12.5% 12.5% 12.5% 12.5%
Female 12.5% 12.5% 12.5% 12.5%

Pop Quiz – Quiz Yourself

  • A two-sample chi-square is also known as a ________.

A). Goodness of fit test

B). Test of independence

C). Wilcoxon rank

D). Mann-Whitney U

Pop Quiz – Quiz Yourself

  • A two-sample chi-square is also known as a ________.

A). Goodness of fit test

B). Test of independence

C). Wilcoxon rank

D). Mann-Whitney U

Part Three

Computing The Chi-Square Test Statistic

Computing The Chi-Square Test Statistic

  • Let’s focus on each test separately

1). Computing the one sample chi square test statistic

2). Computing the chi square of independence test statistic

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

The one sample chi square test compares what we observe with what we expect by chance. It uses this formula

X2 is the chi-square value

Σ is the summation sign

O Is the observed frequency

E is the expected frequency

X2 = Σ

(O – E )2

E

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Stastic

Let’s say we get the following data from our enrollment rosters at FIU (including all online, live, MMC, and BBC students!)

Time to walk through out eight research steps! I trust you recall all of these from Research Methods and Design One!

Freshmen Sophomores Juniors Seniors Total
15,000 13,500 11,000 10,500 50,000

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step One: State the null and alternative research hypotheses

Our null hypothesis is that the four groups do not differ

HO: PFresh = PSoph = PJunior = PSenior

Our research (alternative) hypothesis is there are differences in the proportion of occurrences in each “year” category

H1: PFresh ≠ PSoph ≠ PJunior ≠ PSenior

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Two: State the level of risk

Similar to last semester, we get to set our own risk. We’ll go with the usual psychology suspects, either p < .05 or p < .01

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Three: Select the appropriate test statistic

We are looking at categories for our one sample data set, or Freshmen, Sophomores, Juniors, and Seniors

As such, we are dealing with a nominal variable, right!

We need to use the mean if we want to run parametric tests like a t-Test or an ANOVA, but since we have a nominal variable, the mean is … meaningless here

What would our mean even be? Something between a Freshman and a Sophomore. What is that, some kind of Freshomore? Makes no sense!

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Three: Select the appropriate test statistic

We are looking at categories for our one sample data set, or Freshmen, Sophomores, Juniors, and Seniors

Given our nominal “year” variable, we have to use a non-parametric test here.

The chi-square is perfect, as it can examine categorical (nominal) variables

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Consider our “year” data again (Note: I did make these up!)

To set up our chi-square calculations, we need to look at the observed frequency (tabled above), our expected frequency (there are four groups, so divide 50,000 by 4 to get 12,500 each). We need the difference, too, and some squaring! …

Freshmen Sophomores Juniors Seniors Total
15,000 13,500 11,000 10,500 50,000

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Here are our observed and expected values

Year Observe Expect Difference (O – E)2 (O – E)2 / E
Fresh. 15000 12500
Soph. 13500 12500
Junior 11000 12500
Senior 10500 12500
Total

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Subtract observed from the expected (ignore negative signs)

Year Observe Expect Difference (O – E)2 (O – E)2 / E
Fresh. 15000 12500 2500
Soph. 13500 12500 1000
Junior 11000 12500 1500
Senior 10500 12500 2000
Total

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Square each difference number (e.g. 2500 X 2500 = 6250000)

Year Observe Expect Difference (O – E)2 (O – E)2 / E
Fresh. 15000 12500 2500 6250000
Soph. 13500 12500 1000 1000000
Junior 11000 12500 1500 2250000
Senior 10500 12500 2000 4000000
Total

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Divide the square of each difference by its “expected” number

Year Observe Expect Difference (O – E)2 (O – E)2 / E
Fresh. 15000 12500 2500 6250000 500
Soph. 13500 12500 1000 1000000 80
Junior 11000 12500 1500 2250000 180
Senior 10500 12500 2000 4000000 320
Total

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Four: Compute the test statistic

Our total chi square value is 500 + 80 + 180 + 300 = 1080

Year Observe Expect Difference (O – E)2 (O – E)2 / E
Fresh. 15000 12500 2500 6250000 500
Soph. 13500 12500 1000 1000000 80
Junior 11000 12500 1500 2250000 180
Senior 10500 12500 2000 4000000 320
Total 1080

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Five: Determine the value needed to reject the null

If you look in Appendix B (Salkind), you’ll see the chi-square table starting on page 380

But we must first determine our degrees of freedom. For the one sample chi square, this is r – 1, where r is the # of rows

In this case, we have four rows (four “years”), so r – 1 gives us 4 – 1, or 3 for our degrees of freedom

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Five: Determine the value needed to reject the null

Using df = 3, look up the critical value

In this case, with a df of 3, we need to surpass a critical value of 7.82 for the p < .05 level and 11.34 to surpass the p < .01 level

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Six: Compare the obtained value and the critical value

We compare our obtained value of 1080 to our critical value of 7.82 (for p < .05) and 11.34 (for p < .01)

Is 1080 larger than either 7.82 or 11.34?

Well …

Computing The Chi-Square Test Statistic

  • 1). Computing The One Sample Chi-Square Test Statistic

Step Seven / Eight: Make a decision

Since 1080 is clearly larger than our critical values, we can conclude that the null hypothesis cannot be accepted. Our observed values differ from our expected values

The “goodness of fit” (another name for the chi-square test) is not very “good” here. That is, our observed data does not “fit” the expected data

Computing The Chi-Square Test Statistic

  • So How Do I Interpret X2(3) = 1080, p < .01

X2 represents the test statistic (Chi square)

3 is the number of degrees of freedom (r – 1, or 4 – 1 = 3)

1080 is the obtained value

p < .01 indicates that the probability is less than 1% that the null hypothesis is correct across all categories by chance alone

Computing The Chi-Square Test Statistic

  • How Would I Write Up This Result In A Results Section?

“A chi-square goodness-of-fit test was performed to determine whether FIU students were equally distributed across the four years in college. Results showed that the students were not equally distributed, X2(3) = 1080, p < .01.”

Pop Quiz – Quiz Yourself

  • If our degrees of freedom is 20, what critical value do we need to overcome to conclude that our obtained value is significant at the p < .01 level?

A). 24.89

B). 31.41

C). 36.19

D). 37.57

E). 38.93

Pop Quiz – Quiz Yourself

  • If our degrees of freedom is 20, what critical value do we need to overcome to conclude that our obtained value is significant at the p < .01 level?

A). 24.89

B). 31.41

C). 36.19

D). 37.57

E). 38.93

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

We just looked at a one sample chi square, but sometimes we have more than one variable that we may want to assess, all of which are nominal in nature

For example, what if we want to see if there is a difference in “year” based on “gender” of the student.

We might get a table like this for our “expectations” for a population of 50,000 FIU students …

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Two group design

This includes 50,000 students total, or 25,000 males and 25,000 females (if you do the 50/50 split for gender). Divide 25,000 by four years, and you get 6250 per year (12.5% of 50,000 gets us to this 6250 as well!). Nice and easy, right!

Gender Freshmen Sophs. Juniors Seniors
Males 6250 6250 6250 6250
Females 6250 6250 6250 6250

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Two group design

Yeah, nothing is really easy in statistics. In fact, when you look at more than one variable, the simple “expectation” route is not really appropriate.

In fact …

Gender Freshmen Sophs. Juniors Seniors
Males 6250 6250 6250 6250
Females 6250 6250 6250 6250

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Two group design

FORGET the scores above! The chi-square of independence uses a statistical calculation of the expectation, which is based on the expected value for one variable working in concert with the expected value for the second variable. Ugh. Calculations:

Gender Freshmen Sophs. Juniors Seniors
Males 6250 6250 6250 6250
Females 6250 6250 6250 6250

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Two group design – The “Real Expected” values

Do you want to know what the “Real Expected” values are?

Well, here they are …

Gender Freshmen Sophs. Juniors Seniors
Males
Females

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Two group design – The “Real Expected” values

You’re probably scratching your head right now, wondering how I got these numbers. This is where some calculations come into play. Believe it or not, we need to begin with our “observed” values to calculate our “expected” values …

Gender Freshmen Sophs. Juniors Seniors
Males 6975 6277.5 5115 4882.5
Females 8025 7222.5 5885 5617.5

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Consider our “observed” values below, the values we actually observe. (Note: I made up the data below, but it is possible!)

What we need now are totals for the columns and rows …

Gender Freshmen Sophs. Juniors Seniors
Males 7000 6000 5250 5000
Females 8000 7500 5750 5500

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Here’s a rearranged table that adds blank cells for each row (?) and each column (?) as well as a Column Total + Row Total (?)

Let’s fill in the blank cells by doing some basic addition

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 ?
Female 8000 7500 5750 5500 ?
Column Total ? ? ? ? ?

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Pretty easy, right.

Our male total is 7000 + 6000 + 5250 + 5000 = 23250

Freshmen total is 7000 + 8000 = 15000, and so forth

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Now multiply each row by each column and divide by total N, which will give us our expectation for each gender*year cell

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Freshman males, we have 15000*23250 / 50000 = 6975

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

That is, for Freshman males, our expected value is 6975! Thus we expect 6975 Freshman males. Let’s table that quickly …

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Here is our new “Expectation” (Mathematically Derived)

Gender Freshmen Sophs. Juniors Seniors
Males 6975
Females

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Soph. males, we have 13500*23250 / 50000 = 6277.5

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

Here is our new “Expectation” (Mathematically Derived)

And so on …

Gender Freshmen Sophs. Juniors Seniors
Males 6975 6277.5
Females

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Junior males, we have 11000*23250 / 50000 = 5115

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Senior males, we have 10500*23250 / 50000 = 4882.5

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Freshman females, we have 15000*26750 / 50000 = 8025

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For Soph. females, we have 13500*26750 / 50000 = 7222.5

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For junior females, we have 11100*26750 / 50000 = 5885

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

For senior females, we have 10500*26750 / 50000 = 5617.5

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

So, this is our final set of “Expectation” data (familiar, right!)

Here is our “Observation” data. Time to calculate chi square!

Gender Freshmen Sophs. Juniors Seniors
Males 6975 6277.5 5115 4882.5
Females 8025 7222.5 5885 5617.5
Gender Freshmen Sophs. Juniors Seniors
Males 7000 6000 5250 5000
Females 8000 7500 5750 5500

Computing The Chi-Square Test Statistic

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 7000 6975
M. So. 6000 6277.5
M. Jr. 5250 5115
M. Sr. 5000 4882.5
F. Fr. 8000 8025
F. So. 7500 7222.5
F. Jr. 5750 5885
F. Sr. 5500 5617.5
Total

Computing The Chi-Square Test Statistic

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 7000 6975 25
M. So. 6000 6277.5 277.5
M. Jr. 5250 5115 135
M. Sr. 5000 4882.5 117.5
F. Fr. 8000 8025 25
F. So. 7500 7222.5 277.5
F. Jr. 5750 5885 135
F. Sr. 5500 5617.5 117.5
Total

Computing The Chi-Square Test Statistic

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 7000 6975 25 625
M. So. 6000 6277.5 277.5 77006.25
M. Jr. 5250 5115 135 18225
M. Sr. 5000 4882.5 117.5 13806
F. Fr. 8000 8025 25 625
F. So. 7500 7222.5 277.5 77006.25
F. Jr. 5750 5885 135 18225
F. Sr. 5500 5617.5 117.5 13806.25
Total

Computing The Chi-Square Test Statistic

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 7000 6975 25 625 .089
M. So. 6000 6277.5 277.5 77006.25 12.27
M. Jr. 5250 5115 135 18225 3.56
M. Sr. 5000 4882.5 117.5 13806 2.82
F. Fr. 8000 8025 25 625 .078
F. So. 7500 7222.5 277.5 77006.25 10.66
F. Jr. 5750 5885 135 18225 3.10
F. Sr. 5500 5617.5 117.5 13806.25 2.45
Total

Computing The Chi-Square Test Statistic

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 7000 6975 25 625 .089
M. So. 6000 6277.5 277.5 77006.25 12.27
M. Jr. 5250 5115 135 18225 3.56
M. Sr. 5000 4882.5 117.5 13806 2.82
F. Fr. 8000 8025 25 625 .078
F. So. 7500 7222.5 277.5 77006.25 10.66
F. Jr. 5750 5885 135 18225 3.10
F. Sr. 5500 5617.5 117.5 13806.25 2.45
Total 35.042

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

So, our next step is to focus on the chi square table again to see if our obtained value of 35.042 is high enough to overcome the critical value

Of course, we need to calculate the df once again. For the chi square of independence, the formula is

df = (# of rows – 1) X (# of columns – 1)

df = (2 – 1) X (4 – 1)

df = 1 X 3 = 3

Computing The Chi-Square Test Statistic

  • 2). Computing The Chi-Square Of Independence Test Statistic

The df 3 critical value is 7.82 (p < .05) or 11.34 (p < .01)

Our 35.042 is clearly over both, so we can say that our gender and year in school observations are significantly different than what we would expect by chance ay p < .01!

In fact, it is significant at the p < .00001 level. How do I know that? Well, I cheated a bit and used a computer. I’ll show you that in a moment, I PROMISE! For now, some self-testing …

Pop Quiz – Quiz Yourself

  • If we run a two factor chi square of independence looking at employment (employed versus unemployed) and parenthood (has children versus has no children), what df would we use?

A). 1

B). 1 and 1

C). 2

D). 2 and 2

E). 3

Pop Quiz – Quiz Yourself

  • If we run a two factor chi square of independence looking at employment (employed versus unemployed) and parenthood (has children versus has no children), what df would we use?

A). 1 employment (2 – 1) X parent (2 – 1) = 1 X 1 = 1

B). 1 and 1

C). 2

D). 2 and 2

E). 3

Pop Quiz – Quiz Yourself

  • If we run a two factor chi square of independence looking at employment (employed versus unemployed) and parenthood (has no children versus has one child versus two or more children), what df would we use?

A). 1

B). 1 and 1

C). 2

D). 2 and 2

E). 3

Pop Quiz – Quiz Yourself

  • If we run a two factor chi square of independence looking at employment (employed versus unemployed) and parenthood (has no children versus has one child versus two or more children), what df would we use?

A). 1

B). 1 and 1

C). 2 employment (2 – 1) X parent (3 – 1) = 1 X 2 = 2

D). 2 and 2

E). 3

Computing The Chi-Square Test Statistic

  • Pause-Problem #1 (Parametric v. Non-Parametric)

Let’s see how much you have been paying attention. For your first Pause-Problem in this chapter, please tell me three things that differentiate parametric from non-parametric tests (Hint: There are actually four, so see if you can spot them all!)

#1

Part Four

Using The Computer To Perform A Chi-Square Test

Part Four (A)

1). One Sample Chi-Square

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

Let’s focus on the one sample chi square first

Here, we look at only one variable (our variable is “year”, so we assess expected values for Freshmen, Sophomores, Juniors, and Seniors)

Forget about gender variable for now for this one sample chi square. We just want to see if the number of students in each year differs from what we would expect by chance.

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

First, we need to enter our data into SPSS

Usually, we need one “year” cell for each student

Since we have 15,000 Freshmen, I would be entering the number 1 in the “Year” column 15,000 times! (1 = Freshmen)

Sorry, I am not that crazy, so I am going to reduce this to 150 for our Freshman for these few slides …

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

First, we need to enter our data into SPSS

So this SPSS data set is based on 150 Freshmen (15,000 originally), 135 Sophomores (13,500 originally), 110 juniors (11,000 originally), and 105 seniors (10,500 originally), or 500 total (50,000 originally).

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

First, we need to enter our data into SPSS

Remember, this is a nominal variable, so 1 could be Seniors, 2 could be Juniors, 3 could be Freshmen, and 4 could be sophomores

The actual “year” number is irrelevant and arbitrary. In fact, SPSS allows me to just look at the label if I want …

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

First, we need to enter our data into SPSS

Remember, this is a nominal variable, so 1 could be Seniors, 2 could be Juniors, 3 could be Freshmen, and 4 could be sophomores

The actual “year” number is irrelevant and arbitrary. In fact, SPSS allows me to just look at the label if I want …

See!

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi Square (One Sample)

Second, we click analyze, find the “non-parametric test” option, and find the “Legacy Dialogs” option, which opens up the chi square (one sample) test.

Move your variable (“year”) to the “Test variable list”

Click “okay”

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

This is the first table in our output.

As you see, we get our “Observed N” for each year and our “Expected N” (Expected N is also 500 total, or 500 / 4 = 125 for each year). We also see residuals (Observed minus Expected)

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi

This is the second table in our output.

Our df is still 3 (four years minus one, or 4 – 1 = 3)

Our chi square is 10.800. Our hand calculation was 1080, but in SPSS we dealt with 500 students rather than 50,000, so just move the decimal here and you’ll see we duplicate our answer!

Square (One Sample)

Using The Computer – The Chi Square

  • 1). Using The Computer To Compute A Chi Square (One Sample)

How Would I Write Up This Result In A Results Section?

“A chi-square goodness-of-fit test was performed to determine whether FIU students were equally distributed across four years in college. Results showed that the students were not equally distribute, X2(3) = 10.80, p < .01.”

Pop Quiz – Quiz Yourself

  • If there is no difference between what is observed and what is expected, your chi-square value will be:

A). 0

B). 1

C). -1

D). Cannot be determined

Pop Quiz – Quiz Yourself

  • If there is no difference between what is observed and what is expected, your chi-square value will be:

A). 0

B). 1

C). -1

D). Cannot be determined

Part Four (B)

2). Chi-Square Of Independence

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

IMPORTANT: In your first study (Paper II), you will compare two nominal variables (a nominal dependent variable and a nominal independent variable) to see if the observation differs by chance, so THIS test is the one to use …

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

I am going to get to the SPSS computer analysis in a moment for the chi square of independence, but I just want to mention that there are lots of free online statistical programs you can use for your data

For the independent chi square analysis, I found a site that was very helpful in the calculations.

Note: The font of the numbers are small in these next tables, but they duplicate the tables we just went through!

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Lots of online programs will do this for you. For example, consider this website, where you enter your observed counts: http :// www.socscistatistics.com/tests/chisquare2/Default2.aspx

Blank “Starting” Screen

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Lots of online programs will do this for you. For example, consider this website, where you enter your observed counts: http :// www.socscistatistics.com/tests/chisquare2/Default2.aspx

Insert your gender and year (nominal variables) categories

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Lots of online programs will do this for you. For example, consider this website, where you enter your observed counts: http :// www.socscistatistics.com/tests/chisquare2/Default2.aspx

This is our original “observed” table for gender and year

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Lots of online programs will do this for you. For example, consider this website, where you enter your observed counts: http://www.socscistatistics.com/tests/chisquare2/Default2.aspx

Ta da! Σ (E – O)2 / E to get your 35.04 chi square statistic!

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Lots of online programs will do this for you. For example, consider this website, where you enter your observed counts: http://www.socscistatistics.com/tests/chisquare2/Default2.aspx

I promised to tell you how I got p = .00001? Promise kept!

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Unfortunately, dropping our sample from 50,000 down to 500 in SPSS actually impacts the chi square outcome for independent chi square tests when I run it in SPSS

Since I don’t want to enter 50,000 participants into SPSS, let me show you the calculation for 500 students instead

But first, a friendly reminder of our 50,000 participants …

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Remember this table?

It now becomes …

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 7000 6000 5250 5000 23250
Female 8000 7500 5750 5500 26750
Column Total 15000 13500 11000 10500 50000

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Remember this table?

For the chi square, we multiply each row by each column / n

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 70 60 53 50 233
Female 80 75 57 55 276
Column Total 150 135 110 105 500

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Remember this table?

An N of 500 is much easier to enter into SPSS than 50,000!

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 70 60 53 50 233
Female 80 75 57 55 276
Column Total 150 135 110 105 500

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Remember this table?

For Freshmen males, 150 X 233 = 34950 / 500 = 69.9 etc.

Gender Freshmen Sophs. Juniors Seniors Row Total
Male 70 60 53 50 233
Female 80 75 57 55 276
Column Total 150 135 110 105 500

Computing The Chi-Square Test Statistic

  • Computing The Chi-Square Of Independence Test Statistic

Again, here is our “Expectation” data

Here is our “Observation”. Now, time to calculate chi square!

Gender Freshmen Sophs. Juniors Seniors
Males 69.90 62.91 51.26 48.93
Females 80.10 72.09 58.74 56.07
Gender Freshmen Sophs. Juniors Seniors
Males 70 60 53 50
Females 80 75 57 55

Using The Computer – The Chi Square

G / Yr. Observe Expect Difference (O – E)2 (O – E)2 / E
M. Fr. 70 69.90 .10 .01 .00
M. So. 60 62.91 2.91 8.47 .13
M. Jr. 53 51.26 1.74 3.03 .06
M. Sr. 50 48.93 1.07 1.44 .02
F. Fr. 80 80.10 .10 .01 .00
F. So. 75 72.09 2.91 8.46 .12
F. Jr. 57 58.74 1.74 3.02 .05
F. Sr. 55 56.07 2.07 1.07 .02
Total .407

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

Here, our chi square for independent samples gives us .407 (you can see this below from the online calculator as well as in the table in the previous slide)

Now, let’s see the SPSS version

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

In SPSS, we use a different procedure than the one sample chi square to look at a chi square test of independence.

In SPSS, first go into “Analyze”, then “Descriptive Statistics”, and find the “Crosstabs” statistical test

A BIG NOTE HERE: You will do this SPSS test for Paper II with your study one, so pay very close attention!

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

Move “Year” and “Gender” to the correct column

It doesn’t matter which goes where

Next, click the “Statistics” button

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

In “Statistics”, select the “Chi Square” as well as “Phi and Cramer’s V”

Then click continue and then okay

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

Our first table is the crosstabulation table. This simply tells us how many variables fall into each cell (70 male freshmen, 60 male sophomores, etc.

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

Our second table is more important: our Chi Square table

Focus on Pearson: It is NOT significant, with df = 3 and a value of .407 (p = .939)

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

What about our independent samples chi square?

So SPSS found the same thing as both our hand calculation for 500 students and our online calculator (some rounding is involved to get us to that .407, of course!)

The final table looks at phi. Phi is essentially a correlation, ranging from 0 to +1. A low phi (.029) means there is little correlation between our two nominal variables here

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Writing up our non-significant chi square test of independence

“There was no significant relationship between gender and year in school. X2(3) = .407, p > .05. The number of males and females did not differ from chance when taking into account their year in school.”

X2 is our chi square test and value

3 is our degrees of freedom, or (2 – 1)*(4 – 1) = 1 X 3 = 3

p < .05 is our significance level

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Writing up our non-significant chi square test of independence

Imagine there was significance (Pearson value was 18.26 and p = .0023). This is what that write-up would look like:

“There was a significant relationship between gender and year in school. X2(3) = 18.26, p > .05.”

In your lab slideshow, I will show you an even more precise way of looking at percentages, but this is good for now

Using The Computer – The Chi Square

  • 2). Using The Computer To Compute Chi-Square of Independence

Writing up our non-significant chi square test of independence

Imagine there was significance (Pearson value was 18.26 and p = .0023). This is what that write-up would look like:

“There was a significant relationship between gender and year in school. X2(3) = 18.26, p > .05.”

Of course, I want to see if you can do a write-up similar to this on your own! Time for your second Pause-Problem …

Using The Computer – The Chi Square

  • Pause-Problem #2 (Computer Output):

Let’s say you design a study looking at cell phones. You ask participants what their current cell phone brand is and what brand of phone they would LIKE to have. You get this …

Now, consider your Chi Square table …

#2

Using The Computer – The Chi Square

  • Pause-Problem #2 (Computer Output):

Chi Square Test of Independence

Using these two tables, write out the results as you would see them in a results section of an APA formatted journal article

#2

Part Five

Other Nonparametric Tests You Should Know About

Other Nonparametric Tests

  • Other Nonparametric Tests You Should Know About

Sometimes we use nonparametric tests when we have nominal variables (as we saw here), but other times you might use such tests when …

1). You do not have a normal curve (and thus you cannot use a t-Test or ANOVA, which rely on normal distributions)

2). You have a sample size smaller than that required by either a t-Test or an ANOVA

3). There are other violations of the assumptions underlying parametric tests

Other Nonparametric Tests

  • Other Nonparametric Tests You Should Know About

Table 17.1 in your Salkind textbook (page 360) lists several nonparametric tests, including tests like …

Categorical Data Tests (nominal data) :

McNemar Test For Significance of Changes

Fisher’s Exact Test

Chi-Square One Sample Test (which we covered in this presentation)

Other Nonparametric Tests

  • Other Nonparametric Tests You Should Know About

Table 17.1 in your Salkind textbook (page 360) lists several nonparametric tests, including tests like …

Rank-Ordered Data Tests (ordinal data)

Kologorov-Smirnov Test

The Sign or Median Test

Mann-Whitney U Test

Wilcoxon Rank Test

Other Nonparametric Tests

  • Other Nonparametric Tests You Should Know About

Table 17.1 in your Salkind textbook (page 360) lists several nonparametric tests, including tests like …

Rank-Ordered Data Tests (ordinal data)

Kruskal-Wallis One Way ANOVA

Friedman Two Way ANOVA

Spearmen Rank Correlation Coefficient

Other Nonparametric Tests

  • Other Nonparametric Tests You Should Know About

We are not going to cover these in this course, but just be aware that they exist (especially if you go on to become an academic!)

Using The Computer – The Chi Square

  • Pause-Problem #3 (A Chi Square Study)

Now that you have a better idea about what differentiates a one sample chi square from an independent samples (two factor) chi square, I want you to come up with one study idea that would use a one sample chi square and one study that would use an independent samples (two factor) chi square

One restriction here: You cannot use your lab study idea

#2

Part Six

An Eye Toward The Future

An Eye Toward The Future

  • Here your last Pause-Problem #4 (Pop Quiz)

Yup, this slide again!

For your last Pause-Problem, I want YOU to write a multiple choice pop-quiz question based on the content of this chapter. I might use your question on a future pop quiz or actual course exam (though not this semester), so make it good! Make sure to include your correct answer and up to five possible answers!

#4

An Eye Toward The Future

  • An Eye Toward The Future

Make sure you fully understand the chi-square here, as you will analyze some of your study one data using this procedure

You should be all set with regard to your results section, as you now know all about descriptive statistics (mean, the standard deviation, chi square) and inferential statistics (t-Test, ANOVA)

An Eye Toward The Future

  • An Eye Toward The Future

Next week, though, I want to return to an earlier Smith and Davis chapter, Chapter 4 (Non-experimental methods).

As you start to work on materials for your second study in your labs, you’ll learn how to create questionnaires and surveys as you work through the Chapter 4 sections.

An Eye Toward The Future

  • Finally, it is VERY, VERY, VERY important for you to read your lab presentation immediately. Since many of your papers are based on content covered in the lab, you need to know about that content sooner rather than later
  • So, here is your reminder to read that lab presentation immediately