Difference between revisions of "SOCR EduMaterials AnalysisActivities TwoPairedT"

From SOCR
Jump to: navigation, search
(entered new example from Nicolas Christou)
 
(One intermediate revision by the same user not shown)
Line 42: Line 42:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Value at baseline || Value at the end  || Difference
+
! || Value at baseline || Value at the end  || Difference
 
|-
 
|-
 
| Subject 1  || <math>x_{1b}</math>  ||<math>x_{1a}</math>  || <math>d_1=x_{1b}-x_{1a}</math>   
 
| Subject 1  || <math>x_{1b}</math>  ||<math>x_{1a}</math>  || <math>d_1=x_{1b}-x_{1a}</math>   
Line 50: Line 50:
 
| Subject 3  || <math>x_{3b}</math>  ||<math>x_{3a}</math>  || <math>d_3=x_{3b}-x_{3a}</math>   
 
| Subject 3  || <math>x_{3b}</math>  ||<math>x_{3a}</math>  || <math>d_3=x_{3b}-x_{3a}</math>   
 
|-
 
|-
| ... || ...|| ...
+
| ... || ...|| ... || ...
 
|-
 
|-
| ... || ...|| ...                  
+
| ... || ...|| ... || ...               
 
|-
 
|-
 
| Subject ''n'' || <math>x_{nb}</math> ||<math>x_{na}</math> || <math>d_n=x_{nb}-x_{na}</math>   
 
| Subject ''n'' || <math>x_{nb}</math> ||<math>x_{na}</math> || <math>d_n=x_{nb}-x_{na}</math>   
Line 100: Line 100:
 
|-
 
|-
 
| 28  || 43 || 15     
 
| 28  || 43 || 15     
|}<center>
+
|}</center>
  
 
* Test the null hypothesis that the means before and after are the same.  Use <math>\alpha=0.05</math>.
 
* Test the null hypothesis that the means before and after are the same.  Use <math>\alpha=0.05</math>.
 +
 +
===References===
 +
* [http://circ.ahajournals.org/cgi/reprint/48/3/619.pdf Levine, P. H. (1973). An acute effect of cigarette smoking on platelet function, Circulation, 48, 619-623].
  
 
<hr>
 
<hr>
  
 
{{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php?title=SOCR_EduMaterials_AnalysisActivities_TwoPairedT}}
 
{{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php?title=SOCR_EduMaterials_AnalysisActivities_TwoPairedT}}

Latest revision as of 18:41, 9 August 2009

SOCR Analysis - Two Paired Sample T-Test Example

This is a test for the hypothesis that two groups are with the same mean, while the data are actually paired. That is, Each value of group 1 has a corresponding value in group 2.

Two Paired Sample T-Test Example

Go to the SOCR Two Paired Sample T-Test Applet. We will demonstrate Two Paired T-Test with a SOCR built-in example. This example is based on a dataset from the statistical program "R." For more information of the R program, please see CRAN Home Page. The dataset used here is "shoes" under R's "MASS" library. In the dataset, ten boys are given to the wear of shoes of materials A and B for one foot. We'd like to find if one material is better than the other.


Here's the steps of the activity:

1. Click on Two Paired Sample T-Test at the left panel's combo box.

SOCR AnalysisActivities TwoPairedT Chu 051707 Fig1.gif


SOCR AnalysisActivities TwoPairedT Chu 051707 Fig1A.gif


On the right panel, first click on EXAMPLE 3 and next click on "Data" to retreive the demonstrated example. This is the example we'll be looking at.Note that the data are difference of B - A.

SOCR AnalysisActivities TwoPairedT Chu 051707 Fig2.gif


2. Click on the "Mapping" button to get to the "Mapping" panel. Click on "ADD" under VARIABLE 1 to add A and click on ADD under VARIABLE 2 to add B. We care about the difference, so which on goes to VARIABLE 1 or VARIABLE 2 is arbitrary. Here, the computer will set difference = Variable 2 - Variable 1. If you like the subtraction to go the other way around, simple assign VARIABLE 1 and VARIABLE 2 in the opposite way.


SOCR AnalysisActivities TwoPairedT Chu 051707 Fig3.gif


3. Click on "Calculate" then "Result" to see the results.


SOCR AnalysisActivities TwoPairedT Chu 051707 Fig4.gif


Questions for students: By looking at the test results, what do you think about the data? What can you say about the two different shoe materials?

Example 2

In many experiments the same variable is measured under two different conditions. For example, in clinical trials the participants may be evaluated at baseline and then evaluated again at the end of the treatment. For example, the blood pressure is measured for several patients before and after administration of certain drug. The difference between the value at baseline and the value at the end is computed for each participant as follows:

Value at baseline Value at the end Difference
Subject 1 \(x_{1b}\) \(x_{1a}\) \(d_1=x_{1b}-x_{1a}\)
Subject 2 \(x_{2b}\) \(x_{2a}\) \(d_2=x_{2b}-x_{2a}\)
Subject 3 \(x_{3b}\) \(x_{3a}\) \(d_3=x_{3b}-x_{3a}\)
... ... ... ...
... ... ... ...
Subject n \(x_{nb}\) \(x_{na}\) \(d_n=x_{nb}-x_{na}\)

We then compute the sample mean and sample standard deviation of the differences. \[\bar d=\frac{\sum_{i=1}^n d_i}{n}, \ \ \ \ s_d^2=\frac{\sum_{i=n}^n(d_i-\bar d)^2}{n-1}\]

The hypothesis we want to test is\[H_0: \mu_d=d_0\] vs. \(H_a: \mu_d<d_0\) or \(\mu_d>d_0\) or \(\mu_d \ne d_0\).

If we choose \(d_0=0\) we are testing whether the before and after treatment are the same.

  • Test statistic:

\[t=\frac{\bar d - d_0}{\frac{s_d}{\sqrt{n}}}\]

  • Assumption:
The differences are treated as a random sample from a normal distribution.

We reject \(H_0\) if the \(t\) value falls in the rejection region which is based on the significance level \(\alpha\) and \(n-1\) degrees of freedom.

To study the effect of cigarette smoking on platelet aggregation researchers drew blood samples from 11 individuals before and after they smoked a cigarette and measured the percentage of blood platelet aggregation (from Mathematical Statistics and Data Analysis, John Rice, Third Edition, Duxbury, 2007). Platelets are involved in the formation of blood clots, and it is known that smokers suffer more from disorders involving blood clots than do nonsmokers. This study can be found in Levine, P. H. (1973). An acute effect of cigarette smoking on platelet function, Circulation, 48, 619-623.

Before After Difference
25 27 2
25 29 4
27 37 10
44 56 12
30 46 16
67 82 15
53 57 4
53 80 27
52 61 9
60 59 -1
28 43 15
  • Test the null hypothesis that the means before and after are the same. Use \(\alpha=0.05\).

References




Translate this page:

(default)
Uk flag.gif

Deutsch
De flag.gif

Español
Es flag.gif

Français
Fr flag.gif

Italiano
It flag.gif

Português
Pt flag.gif

日本語
Jp flag.gif

България
Bg flag.gif

الامارات العربية المتحدة
Ae flag.gif

Suomi
Fi flag.gif

इस भाषा में
In flag.gif

Norge
No flag.png

한국어
Kr flag.gif

中文
Cn flag.gif

繁体中文
Cn flag.gif

Русский
Ru flag.gif

Nederlands
Nl flag.gif

Ελληνικά
Gr flag.gif

Hrvatska
Hr flag.gif

Česká republika
Cz flag.gif

Danmark
Dk flag.gif

Polska
Pl flag.png

România
Ro flag.png

Sverige
Se flag.gif