Description
Stars hw and lab
Unformatted Attachment Preview
Lab 8: Comparing Independent Means
Your name:
Student ID:
H: Paperback version page numbers, O: Online book page numbers
Before beginning this lab: Attend the relevant lecture and read Chapter 12:
Comparing Independent Means and pp. (H: 267-268, O: 267-268) in the text.
1. Research question & dataset. Recall the data entered into lab module 2 and
studied in lab modules 2, 3, and 4. You stored these data in “Lab2.sav.” This data
set contains 25 observations and 10 variables for patients who received two forms
of a chemotherapeutic agent called cytarabine (You can also use “Cerebellar
Toxicity.sav” posted on Lab 8 Canvas page). The variable GENERIC is coded “1”
for subjects who received the generic form of the drug (Jones Company). This
variable is coded “2” for subjects who received the innovator version of the product
(Smith Company). We wish to study whether there is an association between use
of the GENERIC drug and high serum creatinine (mg/dl) levels.
a.
Explanatory variable. In studying whether there is an association
between GENERIC drug use and high SCR, which variable is the
explanatory/independent variable? Is this variable measured on a
continuous or categorical scale?
b.
Response variable. Which variable is the response/dependent variable
from part a of Q1? Is this variable continuous or categorical?
c.
Type of samples. For most practical situations, data can be collected as
a single sample (one group), paired sample, or independent samples. We
wish to compare SCR levels in patients receiving the generic drug to
those receiving the innovator drug. In addressing this research question,
are we using a single sample, paired samples or independent samples?
Explain your reasoning.
Note: See pages (H: 267-268, O: 267-268) in the text for a comparison of paired and independent
samples.
1
2. Descriptive and exploratory analysis. Let us explore the samples before
launching into inference. Open your file (File → Open)
Analyze → Descriptive Statistics → Explore
Move SCR to “Dependent List”, and Generic to “Factor List”
Click OK and review the output.
» Note: The term “Dependent variable” is used interchangeably with “response variable.” The
term “Factor” is used interchangeably with “explanatory variable.”
a. Descriptive stats. Report the mean, standard deviation and sample size of
the two groups
Generic
n
Mean
Std. Deviation
1 (yes)
a)
b)
c)
2 (no)
d)
e)
f)
b. Side-by-side boxplots. The prior data run should have produced side-by-side
boxplots as part of its output. Review these plots. Compare the locations of
the distributions. Describe what you see in concise language.
Cut and paste the side-by-side boxplots into a Word document HERE.
2
Note: It will be difficult to make strong statements about the shapes and spreads of the two distributions
because of the small sample sizes of the groups.
3. Estimation of Mean Difference (Confidence Interval). The true value of
mean difference µ1 – µ2 is not known. We can, however, estimate it with a
certain level of confidence.
a. Point estimate ̅1 − ̅2 is the point estimator of µ1 – µ2.
Calculate ̅1 − ̅2 :
b. Standard error (SE) of the mean difference. The standard error
quantifies the precision of ̅1 − ̅2 , as a reflection of µ1 – µ2. The standard
2
2
1
2
error of the mean difference is given by: ̅ 1− ̅ 2 = √ 1 + 2 , where s1 and
s2 are the standard deviations of group 1 and group 2 respectively, and n1
and n2 are the group sample sizes. Calculate this standard error: (Retain
upto 4 decimal places for your final answer. Show your calculations)
̅ 1 − ̅ 2 = √
12 22
+
1 2
c. Degrees of freedom (df). There are several different ways to calculate
the degrees of freedom for our procedure. The best way is to use
dfWelch as shown on page (H: 276, O: 276). However, dfWelch is difficult
to calculate by hand. Therefore, let’s use this conservative method:
dfconserv = the smaller of df1 or df2, where df1 = n1 – 1 and df2 = n2 – 1.
dfconserv =
d. 95% confidence interval for µ1 – µ2. Calculate the 95% CI for µ1 – µ2
by hand, using the formula:
95% = ( ̅1 − ̅ 2 ) ± ( ,1− ) ×
2
3
Where tdf,1-a/2 is the t value with df degrees of freedom and cumulative
probability 1-/2 (from Table C), and SE is the standard error calculated
earlier. After calculating the confidence interval, interpret its meaning:
(Round up to 4 decimal places in your final answer and show your
calculations).
4. Hypothesis (significance) test. Test whether the means differ
significantly. The procedure is described in detail on pp. (H: 277-278, O:
277) in the text.
a. H0 and Ha. Report the null hypothesis and two-sided alternative hypothesis.
a) State H0:
b) State Ha:
̅ − ̅ 2
b. Test statistic. This is given by = 1
̅ 1 −
̅2
, where ̅1− ̅ 2 is the standard
error of the estimate of the mean difference as calculated in 3b, and the degrees
of freedom also as calculated in 3c.
a) tstat =
b) dfconserv =
c. P-value. Use the t table to derive a two-sided P-value for the test.
a) One-tailed P-value =
b) Two-tailed P-value =
4
d. Interpret this result of your hypothesis (significance) test using concise
language. Use alpha = 0.05.
5. SPSS. This part of the Lab will use SPSS to derive estimation and hypothesis testing
results with the computer. After opening the computer, select “SPSS → Analyze →
Compare Means → Independent Sample t-test”. When the dialogue box appears,
drag the response variable into the “Test Variable(s)” field and the explanatory
variable into the “Grouping Variable” field.
Click the “Define Groups” button and enter “1” in the “Group 1” filed and “2” in the “Group
2” field.
Click the “Continue” button and “OK.” Then review the output. The top table of the
output lists descriptive statistics. The bottom table labeled “Independent Samples Test”
lists the confidence interval and test results.
Independent
Samples Test
Levene’s Test
for Equality of
Variances
t-test for Equality of Means
df
F
Sig.
t
Sig. (2tailed)
Mean
Difference
Std. Error
Difference
95% Confidence Interval
of the Difference
Lower
Upper
5
SCR Equal variances assumed
.037
Equal variances not
assumed
.850
-.480
23
.636
-.0533
.1110
-.2830
.1764
-.507 22.464
.617
-.0533
.1051
-.2711
.1644
a. First, test the hypothesis of equal variance.
a) State H0:
b) State Ha:
c) What decision do you make?
Reject Do not reject
(Circle one)
If you do not reject H0, then you conclude that the variances are equal, and then interpret
the t-test using the data on the top row, under “t-test for Equality of Means”. If you reject
H0, then you conclude that the variances are not equal, and you will interpret your results
using the output on the second row, under “t-test for Equality of Means”.
b. Degrees of freedom (df). The degrees of freedom to dfWelch (see page (H:
276, O: 276) in your text). Find this statistic on the SPSS output and report
it here.
dfWelch =
c. Confidence Interval for µ1 – µ2 . Report the 95% CI for µ1 – µ2 for the equal
variance not assume procedure. These limits are based on dfWelch and will
therefore differ somewhat from your hand calculations. They should be
close, however. (Hand calculations were based on dfConserv.)
95% CI for µ1 – µ2 = (
___to
)
» Note: Remember to list the lower confidence limit first.
d. Significance test of H0: µ1 = µ2. Report the t statistic, dfWelch, and P-value
calculated by SPSS. Again, these statistics will be similar (but not identical)
to your hand-calculated results.
a) tstat =
b) dfWelch =
6
c) P-value=
d) Do the mean SCR levels differ significantly? State your conclusion based on
alpha = 0.05.
7
HW 8 Exercises 12.6, 12.12, 12.18
12,6
a)
1-pt
Group
Men
Women
SE =
df =
b)
t (9,.975) =
1-pt
LCL =
UCL =
n
5
6
Delta
9
Mean
219,40
163,83
55,57
Std Dev
32,37
41,73
(Difference of Means)
sqrt((32.37^2/5)+(41.73^2/6))
Given
m = t (9,.975) x SE =
55.57 – m
55.57 + m
Note: “0” is outside the 95% CL
12,12
Group
Control
Women
1-pt
SE =
df =
b)
t (21,.975) =
m=
1-pt
LCL =
UCL =
LCL = 3.90 – m
UCL = 3.90 + m
1-pt
12,18
1-pt
n
22
47
Delta
Mean
0,31
-3,59
3,90
Std Dev
1,30
2,51
sqrt((1.30^2/22)+(2.51^2/47))
smaller sample size-1
m = t (21,.975) x SE
Conclusion:
“0” is outside..
Therefore..
Group
Experimental
Control
SE =
df =
n
38
23
Delta
Mean
33,42
39,71
-6,29
Std Dev
10,18
9,16
sqrt((10.18^2/38)+(9.16^2/23))
smaller sample size-1
Paired
Ho: ud = 0
Ho: u1 – u2 = 0
Ha: u1 – u2 # 0
1-pt
t-stat =
From Table C
1-pt
1-pt
t-stat = -6.29 / SE
< t-stat <
>p>
Conclusion (Reject or not reject Ho; Is there a significant difference?):
Single
Ho: u = 98.6
Purchase answer to see full
attachment