Computer Examples--t Tests
1. Ho: Mu = a
A manufacturer of office furniture is designing a new computer table.
Although it is known that the standard height for typing tables is 26"
inches, the manufacturer is concerned that the best height for a computer
might be different. A sample of n = 30 computer operators is obtained,
and each is asked to position the height of an adjustable table at its most
comfortable level. On the basis of this sample, should the company conclude
that the best height for a computer table is different from 26 inches?
Test with alpha equal .05.
Computer Program -- BMDP3D -- Data File = DESK
/PROBLEM TITLE IS 'T-TEST - ONE SAMPLE'.
/INPUT VARIABLE IS 1.
CASES ARE 30.
FORMAT IS '(T3, F5.2)'.
FILE = 'desk'.
/VARIABLE ADD IS 1.
NAMES ARE HEIGHT,DIFF.
/TRANSFORMATION DIFF = HEIGHT - 26.
/TEST TITLE IS 'TEST FOR ZERO MEAN'.
VARIABLE IS DIFF.
/END
/FINISH
2. Ho: mu-1 - mu-2 = 0 (Independent)
A researcher is interested in testing the opinions of college students
concerning the value of their college education. She suspects that seniors
will place more value on their education than will sophomores. A sample
of 20 seniors and 20 sophomores is selected, and each subject is given an
opinion questionnaire.
Computer Program -- BMDP3D -- Data File = OPINION
/PROBLEM TITLE IS 'T-TEST FOR INDEP. SAMPLES'.
/INPUT VARIABLES ARE 2.
CASES ARE 40.
FORMAT IS '(F1.0,F3.0)'.
FILE = 'opinion'.
/VARIABLE NAMES ARE CATEGORY, OPIN.
GROUP IS CATEGORY.
/GROUP CODES (1) ARE 1, 2.
NAMES (1) ARE SOPH,SR.
/TEST GROUPS ARE SOPH, SR.
/END
/FINISH
3. Ho: mu-1 - mu-2 = 0 (Dependent)
A researcher tests the effectiveness of a drug called Ritalin on hyperkinetic
children. The researcher uses a sample of n = 12 hyperkinetic children
ranging in age from 8 to 9 years of age. The children are told several
brief stories. After each story, the experimenter asks the children questions
about the story. The total number of questions answered correctly for all
of the stories is recorded as the child's score. Because hyperkinetic
children have attentional deficits, they should not perform well on this
task when they are not treated. The researcher tests all of the children
under two conditions: following administration of a sugar pill (placebo
condition) and after receiving Ritalin. Determine if the drug treatment
has an effect on performance. Use an alpha level of .01.
Computer Program -- BMDP3D -- Data File = HYPER
/PROBLEM TITLE IS 'T-TEST FOR DEPENDENT SAMPLES'.
/INPUT VARIABLES ARE 2.
CASES ARE 12.
FORMAT IS '(T3,2F3.0)'.
FILE = 'hyper'.
/VARIABLE ADD IS 1.
NAMES ARE PLACEB,RITAL,DIFF.
/TRANSFORMATION DIFF = PLACEB - RITAL.
/TEST TITLE IS 'TEST FOR ZERO MEAN'.
VARIABLE IS DIFF.
/END
/FINISH
Return to Advanced Statistics Index Page