n318b winter 2002 nursing statistics specific statistical tests chi-square ( 2 ) lecture 7
Post on 17-Jan-2016
218 Views
Preview:
TRANSCRIPT
N318b Winter 2002 Nursing Statistics
Specific statistical tests Chi-square (2)
Lecture 7
Nur 318b 2002 Lecture 6: page 2
School ofNursing
Institute for Work & Health
Today’s Class 5 basic statistical tests covered in course Parametric and non-parametric tests Degrees of freedom << 10 min break >> Example of chi-square test Applying knowledge to assigned readings
Turk et al. (1995)
Followed by small groups 12-2 PMFocus on interpreting chi-square results
Nur 318b 2002 Lecture 6: page 3
School ofNursing
Institute for Work & Health
“In Group” Session
Focuses on an assigned reading.Q1 example of the chi square test Q2 example of the chi square test Q3 criteria for non-parametric test
Key points from the Turk et al paper will be covered in the 2nd part of the lecture
Missing Table 1
Nur 318b 2002 Lecture 6: page 4
School ofNursing
Institute for Work & Health
New Lecture Material
Specific statistical tests: Parametric and non-
parametric tests
Nur 318b 2002 Lecture 6: page 5
School ofNursing
Institute for Work & Health
Specific Statistical Tests
Course will cover five major “tests”:
1. Chi-square (2) 2. T-tests
3. Analysis of variance (ANOVA)
4. Correlation
5. Regression
Nur 318b 2002 Lecture 6: page 6
School ofNursing
Institute for Work & Health
Statistical Tests – cont’dAll these tests do basically the same 3 things:
3. “test statistic” follows known distributions such that the probability of its value occurring can be determined (i.e. its “p-value”)
2. Generate a “test statistic” whose value increases as difference between groups increases (i.e. larger values more significant)
1. Compare 2 or more study groups to each other (or one group to a reference group)
Example: Z-scores
Nur 318b 2002 Lecture 6: page 7
School ofNursing
Institute for Work & Health
Statistical Tests – cont’d
How do you known when to use which test?
Helps to ask some basic questions:1. What kind of data are used?
2. What kind of relationship is of interest?
3. How many groups (samples) involved?- one, two, or more than two
- prediction, association or difference?
- ratio/interval or categorical (ordinal/nominal)- dependent (e.g. follow-up) or independent
Nur 318b 2002 Lecture 6: page 8
School ofNursing
Institute for Work & Health
Key point is determining type of data
For categorical (i.e. either nominal or ordinal data) the normal distribution is generally not applicable and population descriptors (parameters) cannot be estimated so non-parametric tests used
Main non-parametric test is the chi-square test that compares expected (E) numbers with actual or observed (O) numbers
Non-Parametric Tests
Nur 318b 2002 Lecture 6: page 9
School ofNursing
Institute for Work & Health
For continuous (i.e. either interval or ratio data) the normal distribution applies and population descriptors (parameters, like means) can be estimated thus parametric tests are used instead
Main tests for this course include the t-test, paired t-test and analysis of variance (ANOVA), all of which test means
Parametric Tests
Nur 318b 2002 Lecture 6: page 10
School ofNursing
Institute for Work & Health
Parametric vs. non-parametric tests
Data used Examples Comments
Non-parametric
(numbers, %’s)
Nominal, ordinal
(categorical)
Chi-square
Easy to use but limited to simple situations
Parametric
(means, variances)
Interval, ratio
(continuous)
T-tests, ANOVA, regression
More flexible and powerful (also more convincing)
Nur 318b 2002 Lecture 6: page 11
School ofNursing
Institute for Work & Health
Degrees of Freedom
SD = (x-)2
n -1
Recall the formula for SD was “adjusted” for imprecision of small samples
The (n-1) term is referred to as “degrees of freedom” since it indicates how many ways that the data can vary in a sample
Nur 318b 2002 Lecture 6: page 12
School ofNursing
Institute for Work & Health
Degrees of Freedom – cont’d
Value of “test statistic” derived from many statistical tests is dependent on this idea of “degrees of freedom” thus some sense of what it means is useful (e.g. see textbook page 84-85)
df = number of ways that data can vary (or be categorized)
Example – for chi square test:df = (number of categories –1)
Nur 318b 2002 Lecture 6: page 13
School ofNursing
Institute for Work & Health
Example – for chi square test:df = (number of categories –1)
Degrees of Freedom – cont’d
Why?
If total number of subjects is known, and they are categorized into 4 groups, then if three tallies are known the fourth is “fixed” – i.e. it can be derived so it is not “free” to vary
df = (4 –1) = 3
Nur 318b 2002 Lecture 6: page 14
School ofNursing
Institute for Work & Health
Chi square (2) test
How do you known when to use 2 test?
1. What kind of data are used?
2. What kind of relationship is of interest?
3. How many groups (samples) involved?
- categorical ( typically nominal)- frequencies (i.e. counts or percentages) - data can be put in a “contingency table”
- association or difference
- usually two or more (“smallish” number)
Referring back to the 3 “basic questions”:
Nur 318b 2002 Lecture 6: page 15
School ofNursing
Institute for Work & Health
Chi square test - example
One of the most common statistical tests !
Example: We suspect that students at UWO love statistics a lot so we ask 100 nursing students if they really like Nur 318b?
63 say YES, 37 say NO
Is this more than we might have expected – i.e. are UWO nurses crazy about statistics?
Nur 318b 2002 Lecture 6: page 16
School ofNursing
Institute for Work & Health
If we did not think students would be more or less likely to enjoy the course, we would EXPECT 50 to say no and 50 to say YES
Chi square test - example
2 compares observed vs expected numbers
H0: no difference in OBS versus EXP countsHa: OBS count is NOT equal to EXP
Study hypotheses
Nur 318b 2002 Lecture 6: page 17
School ofNursing
Institute for Work & Health
Chi square test - example
YES NO
at UWO
(observed)
67 33
In general
(expected)
50 50
2 = (O-E)2
E
(67-50)2 + (33-50)2
50 50= = 11.56
Nur 318b 2002 Lecture 6: page 18
School ofNursing
Institute for Work & Health
Chi square test - exampleAs with Z-scores, we now look this number (11.56) up in a table of critical values, in this case for the chi square distribution (table value is the probability that observed and expected numbers are the same)
2 (1 df) = 11.56, p < 0.001
Thus we can conclude that UWO nursing students must love stats !!!
Nur 318b 2002 Lecture 6: page 19
School ofNursing
Institute for Work & Health
10 minute break !
Nur 318b 2002 Lecture 6: page 20
School ofNursing
Institute for Work & Health
Chi square test - assumptions
1. Data are counts, frequencies, percentages
2. Smallest table cell counts ideally >5
3. Data in rows and columns are independent (i.e. subjects can be in one table cell only)
4. Categories or levels set BEFORE testing
Nur 318b 2002 Lecture 6: page 21
School ofNursing
Institute for Work & Health
Why is the chi square a nonparametric statistical test?
Chi square test - assumptions
1) it does not assume data are normally distributed (in fact NO assumptions are needed about underlying distribution)
2) categorical/nominal data are used
3) not estimating a population characteristic (i.e. a parameter, like the mean)
Nur 318b 2002 Lecture 6: page 22
School ofNursing
Institute for Work & Health
Part 2: Application to the
Assigned Readings
Nur 318b 2002 Lecture 6: page 23
School ofNursing
Institute for Work & Health
Turk et al. (1995)
Quick summary of the paper: – a cross-sectional study examining the cognitive-behavioral mediation model of depression in chronic pain patients– 100 chronic pain subjects divided into two groups: 73 randomly chosen younger (<70); and 27 older (70 yrs) patients– found a strong link between pain and depression for older subjects but not for younger ones (i.e. an age effect)
Nur 318b 2002 Lecture 6: page 24
School ofNursing
Institute for Work & Health
Some design issues?
Do you have any concerns with design of the study – e.g. using a cross-sectional design to examine chronic pain and depression?
Can pain be more of “social” problem with older people thus “confounding” assessment of depression?
Which came first (“chicken-and-egg”)?
Was assessment of depression “blinded”?
Nur 318b 2002 Lecture 6: page 25
School ofNursing
Institute for Work & Health
Chi square test – example 2:the contingency table
Gender young old Total
Male 45.21(33)
37.04(10) 43
Female 54.79(40)
62.96(17) 57
Total 100%(73)
100%(27) 100
Observed counts from Table 1
Nur 318b 2002 Lecture 6: page 26
School ofNursing
Institute for Work & Health
Chi square test – example 2:the contingency table
How did we get counts from %’s?Just multiply % by total number in groupe.g. 45.21% male in younger group is equal to 0.4521 x 73 = 33 males
How do we get expected counts?
Expected counts assume no association between groups thus they are calculated according to size of cells in groups
Nur 318b 2002 Lecture 6: page 27
School ofNursing
Institute for Work & Health
2 Contingency Table Expected counts
Ri x Cj
NEij =
=
For cell 1,1:
R1 x C1
100E11 =
43 x 73
100= 31.4
For cell 1,2 = 11.6
For cell 2,1 = 41.6
For cell 2,2 = 15.4
Nur 318b 2002 Lecture 6: page 28
School ofNursing
Institute for Work & Health
Gender young old Total
Male 33(31.4)
10(11.6) 43
Female 40(41.6)
17(15.4) 57
Total 73 27 100
2 Contingency Table Expected counts
C1 C2
R1
R2
Nur 318b 2002 Lecture 6: page 29
School ofNursing
Institute for Work & Health
2 Contingency Table Test statistic
2 = (O-E)2
E
(33-31.4)2 + (10-11.6)2
31.4 11.6= (40-41.6)2 + (17-15.4)2
41.6 15.4
+
2 (1 df) = 0.54, p > 0.20
Can’t reject null hypothesis, thus no association !
Nur 318b 2002 Lecture 6: page 30
School ofNursing
Institute for Work & Health
Next Week - Lecture 8:
T-test
For next week’s class please review:1. Page 16 in syllabus2. Textbook Chapter 4, pages 97-1073. Syllabus paper:
Turk et al. (1995)
top related