# AP Statistics Curriculum 2007 NonParam 2MedianPair

(Difference between revisions)
 Revision as of 05:44, 24 February 2008 (view source)IvoDinov (Talk | contribs)← Older edit Revision as of 06:31, 24 February 2008 (view source)IvoDinov (Talk | contribs) Newer edit → Line 4: Line 4: ==Motivational Clinical Example== ==Motivational Clinical Example== - [[AP_Statistics_Curriculum_2007_NonParam_2MedianPair#References | Whitley and Ball reported]] on the relative risk of mortality from 16 studies of septic patients. The outcome measure of interest was whether the patients developed complications of acute renal failure. The relative risk calculated in each study compared the risk of dying between patients ''with'' and ''without'' renal failure. A relative risk of 1.0 means no effect, and relative risk $\not= 1$ suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal of the study was to assess the ''cummulative evidence'' in these 16 studies to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality. The data of this study is included below. + [[AP_Statistics_Curriculum_2007_NonParam_2MedianPair#References | Whitley and Ball reported]] on the relative risk of mortality from 16 studies of septic patients. The outcome measure of interest was whether the patients developed complications of acute renal failure. The relative risk calculated in each study compared the risk of dying between patients ''with'' and ''without'' renal failure. A relative risk of 1.0 means no effect, and relative risk $\not= 1$ suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal of the study was to assess the ''cumulative evidence'' in these 16 studies to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality. The data of this study is included below.
- {| class="wikitable" style="text-align:center; width:75%" border="1" + {| class="wikitable" style="text-align:center; width:35%" border="1" |- |- | '''Study''' || '''Relative Risk''' || '''Sign''' (Relative Risk - 1) | '''Study''' || '''Relative Risk''' || '''Sign''' (Relative Risk - 1) Line 49: Line 49:
[[Image:SOCR_EBook_Dinov_NonParam_SignTest_022308_Fig1.jpg|600px]]
[[Image:SOCR_EBook_Dinov_NonParam_SignTest_022308_Fig1.jpg|600px]]
+ ==The Sign-Test== + The '''sign test''' is a non-parametric alternative the [[AP_Statistics_Curriculum_2007_Infer_2Means_Dep | one-sample and paired T-test]]. The sign test has no requirements for the data to be Normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. Then it measures the difference between the $\pm$ signs and how distinct is this difference from what we would expect to observe by chance alone. For example, if there were no effect of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a "-" sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a "+" sign). In the actual data, 3 studies had "-" signs and the remaining 13 studies had "+" signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis. - ==Approach== - TBD - ==Model Validation== + ===Calculations=== - TBD + Suppose we fix a significance level of $\alpha= 0.05$. And consider the following two hypotheses: - ==Computational Resources: Internet-based SOCR Tools== + : $H_o: \nu_+=8$ (equivalent to $\nu_-=8$):  The effect of developing acute renal failure is not significant on the outcome from sepsis. - TBD + : $H_1: \nu_+ \not=8$:  The effect of developing acute renal failure is significant on the outcome from sepsis. - ==Examples== + Define the following test-statistics - TBD + :$B_s = \max{N_+, N_-}$, where $N_+$ and $N_-$ are the number of positive and negative signs, respectively. - ==Hands-on Activities== + Then the distribution of $B_s \sim Binomial(n=16, p=8/16=0.5)$. - TBD + -
+ For our data, B_s = \max{N_+,N_-}=\max{13,3}=13[/itex] and the probability that such [[AP_Statistics_Curriculum_2007_Distrib_Binomial |binomial variable]] exceeds 13 is $P(Bin(16,0.5,13))=0.010635$. Therefore, we can reject the null hypothesis $H_o$ and regard as significant the effect of developing acute renal failure on the outcome from sepsis. + +
[[Image:SOCR_EBook_Dinov_NonParam_SignTest_022308_Fig2.jpg|600px]]
+ + ==The Sign test using SOCR Analyses== + It is much quicker to use [http://socr.ucla.edu/htmls/SOCR_Analyses.html SOCR Analyses] to compute the statistical significance of the sign test. This [[SOCR_EduMaterials_AnalysisActivities_TwoPairedSign | SOCR Sign test activity]] may also be helpful in understanding how to use the sign test method in SOCR. + + ===Example=== + A set of 12 identical twins are given psychological tests to determine whether the ''first born'' of the set tends to be more aggressive than the ''second born''.  Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of the natural pairing in a set of twins these data can be considered paired. + +
+ {| class="wikitable" style="text-align:center; width:40%" border="1" + |- + | Twin-Index || 1st Born || 2nd Born || Sign + |- + | 1 || 86 || 88 || - + |- + | 2 || 71 || 77 || - + |- + | 3 || 77 || 76 || + + |- + | 4 || 68 || 64 || + + |- + | 5 || 91 || 96 || - + |- + | 6 || 72 || 72 || 0 (Drop) + |- + | 7 || 77 || 65 || + + |- + | 8 || 91 || 90 || + + |- + | 9 || 70 || 65 || + + |- + | 10 || 71 || 80 || - + |- + | 11 || 88 || 81 || + + |- + | 12 || 87 || 72 || + + |} +
+ + We first plot the data using [[SOCR_EduMaterials_Activities_LineChart | the SOCR Line Chart]]. Visually there does not seem to be a strong effect of the order of birth on baby's aggression. + +
[[Image:SOCR_EBook_Dinov_NonParam_SignTest_022308_Fig3.jpg|600px]]
+ + Next we can use the [[SOCR_EduMaterials_AnalysisActivities_TwoPairedSign | SOCR Sign Test Analysis]] to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby's aggressiveness. + +
[[Image:SOCR_EBook_Dinov_NonParam_SignTest_022308_Fig4.jpg|600px]]
+ + Clearly the p-value reported is 0.274, and our data can not reject the null hypothesis. ==References== ==References==

## Revision as of 06:31, 24 February 2008

General Advance-Placement (AP) Statistics Curriculum - Differences of Medians of Two Paired Samples

Distribution-free (or non-parametric) statistical methods provide alternative to the (standard) parametric tests that we saw earlier, and are applicable when the distribution of the data is unknown.

## Motivational Clinical Example

Whitley and Ball reported on the relative risk of mortality from 16 studies of septic patients. The outcome measure of interest was whether the patients developed complications of acute renal failure. The relative risk calculated in each study compared the risk of dying between patients with and without renal failure. A relative risk of 1.0 means no effect, and relative risk $\not= 1$ suggests beneficial or detrimental effect of developing acute renal failure in sepsis. The main goal of the study was to assess the cumulative evidence in these 16 studies to determine whether developing acute renal failure as a complication of sepsis impacts patient mortality. The data of this study is included below.

 Study Relative Risk Sign (Relative Risk - 1) 1 0.75 - 2 2.03 + 3 2.29 + 4 2.11 + 5 0.80 - 6 1.50 + 7 0.79 - 8 1.01 + 9 1.23 + 10 1.48 + 11 2.45 + 12 1.02 + 13 1.03 + 14 1.30 + 15 1.54 + 16 1.27 +

We see the clear analogy of this study design to the paired or one-sample studies we saw before. However, if we were to plot these data (Relative Risk) we can see that their distribution is hardly symmetric, unimodal and bell-shaped (i.e., not Normal). Therefore, we can not use the paired T-test to test a Null-hypothesis that the mean Relative risk is 1 using this parametric test.

## The Sign-Test

The sign test is a non-parametric alternative the one-sample and paired T-test. The sign test has no requirements for the data to be Normally distributed. It assigns a positive (+) or negative (-) sign to each observation according to whether it is greater or less than some hypothesized value. Then it measures the difference between the $\pm$ signs and how distinct is this difference from what we would expect to observe by chance alone. For example, if there were no effect of developing acute renal failure on the outcome from sepsis, about half of the 16 studies above would be expected to have a relative risk less than 1.0 (a "-" sign) and the remaining 8 would be expected to have a relative risk greater than 1.0 (a "+" sign). In the actual data, 3 studies had "-" signs and the remaining 13 studies had "+" signs. Intuitively, this difference of 10 appears large to be simply due to random variation. If so, the effect of developing acute renal failure would be significant on the outcome from sepsis.

### Calculations

Suppose we fix a significance level of α = 0.05. And consider the following two hypotheses:

Ho + = 8 (equivalent to ν = 8): The effect of developing acute renal failure is not significant on the outcome from sepsis.
$H_1: \nu_+ \not=8$: The effect of developing acute renal failure is significant on the outcome from sepsis.

Define the following test-statistics

Bs = maxN + ,N, where N + and N are the number of positive and negative signs, respectively.

Then the distribution of $B_s \sim Binomial(n=16, p=8/16=0.5)$.

For our data, Bs = maxN + ,N = max13,3 = 13 and the probability that such binomial variable exceeds 13 is P(Bin(16,0.5,13)) = 0.010635. Therefore, we can reject the null hypothesis Ho and regard as significant the effect of developing acute renal failure on the outcome from sepsis.

## The Sign test using SOCR Analyses

It is much quicker to use SOCR Analyses to compute the statistical significance of the sign test. This SOCR Sign test activity may also be helpful in understanding how to use the sign test method in SOCR.

### Example

A set of 12 identical twins are given psychological tests to determine whether the first born of the set tends to be more aggressive than the second born. Each twin is scored according to aggressiveness; a higher score indicates greater aggressiveness. Because of the natural pairing in a set of twins these data can be considered paired.

 Twin-Index 1st Born 2nd Born Sign 1 86 88 - 2 71 77 - 3 77 76 + 4 68 64 + 5 91 96 - 6 72 72 0 (Drop) 7 77 65 + 8 91 90 + 9 70 65 + 10 71 80 - 11 88 81 + 12 87 72 +

We first plot the data using the SOCR Line Chart. Visually there does not seem to be a strong effect of the order of birth on baby's aggression.

Next we can use the SOCR Sign Test Analysis to quantitatively evaluate the evidence to reject the null hypothesis that there is no birth-order effect on baby's aggressiveness.

Clearly the p-value reported is 0.274, and our data can not reject the null hypothesis.