STA 102 Lab 7 - Two Sample Hypothesis Testing
(Due with Chapter 8 Homework)
Purpose: To learn how to perform two-sample t-tests in Splus b/c in
the future, it would be a total drag to have to do it by hand. Also,
to present a concise summary of your results using complete
sentences.
You will be writing up your report in some word-processing program, like
Word or Word-Perfect or even Memo-pad/Simple-Text. There should not be
any printing errors involved with this assignment.
Recall the Nutrition example from the worksheet in lecture (refer to
questions 8.37 - 8.42 in your text). You will need your textbook in order
to do this assignment, so go back to your room and get it if you are in
lab right now without it.
- Go into S-plus and start a new worksheet(File -> New).
- Type in the Vitamin C values (from Table 8.14) into the first column
(automagically labelled "V1").
- Type in the Placebo values into the second column ("V2").
- Do NOT type in the "difference" values for the third column
Rather, learn to use the Formula option:
- Click on the EMPTY third column, and Go to Data -> Transform
- Select Target column as (end) - this puts your new variable
column
at the end of the worksheet.
- Type in V1-V2 into the "Expression" box (Or, select "V1"
as your variable and "-" as your operator, then hit "Add", and so
on, until you have V1-V2 in your Expression box), and hit
ok
- You now know how to create a new column of Transformed
Data!!! Your data table should now look identical to Table 8.14 in
your text.
- Decide whether you should do a two-sample paired-t-test or a two-sample
t-test-for-independent-samples (in Splus, these are simply called
paired-t and two-sample t, respectively).
- Now perform the appropriate test by Going to
Statistics -> Compare Samples -> Two-samples -> t Test...
- Choose the appropriate t-test:
- "paired-t," or
- "two-sample t" - in Splus, this means the two-sample t test
for independent samples. In this class, whenever we do this,
assume equal variances. REMEMBER THAT ON THE QUIZZES and EXAMS.
(If you ever want to play with this test without the assumption,
don't click this associated assumption box)
- As described in exercise 8.41, derive a lower one-sided CI
for the
mean difference (Vitamin C - Placebo) by selecting the appropriate option
under "alternative hypothesis":
- "greater" refers to the difference being greater than the null mean
- "less" refers to thd difference being less than the null mean
- Be very careful which one of these you pick, because it depends
on the direction you chose your variables
- Hit "ok" and Look at your results.
- Check that you chose the appropriate alternative hypothesis in Step 9
by carefully reading your althernative hypothesis in the
results report (and remembering which of your variables is Vitamin C
and which one is Placebo, and which CI was asked for.)
- Now, write a short (one-page) lab-report about your
results. Use Complete Sentences and Paragraphs Only! Be sure to
include/address/state the following:
- A Descriptive Title
- State your hypothesis
- Name the test you chose (address questions 8.37-8.39, in
sentences) and why.
- Then, in a paragraph using sentences (not just cut and paste
from the worksheet report) present your results. Answer questions
8.40-8.42 - IN SENTENCES (do not say "the answer to question 8.42 is
blah" or we will all be offended).
- Do not in any way use the question numbers to answer the questions.
- Your report should include ONLY COMPLETE SENTENCES
- Someone who is unfamiliar with this example (who does NOT have the
text) needs to be able to understand exactly what the problem is, where
your data come from, what you did, why, and what it means.
- The end. Yay!