Sei sulla pagina 1di 2

Onesamplettests

SupposeYouobtainasampleof9carstotestacarmanufacturersclaimthatoneofitsmodels
averages30milespergallon.Herearethedatafromthe9carsofthismodel:
31,27,30,28,31,32,27,29,29
WhatisH0?

H0:=

WhatisHa?

Ha:

Calculatethesamplesize,meanandsamplestdevandthetstatistic.
n=

t=

xbar=

s=

X

=

=
s/(sqrt(n)

Tomakeadecisionaboutthenullhypothesis,youneedacriticaltvalue.YoucanuseTableE.6to
findthis,orYoucanbegoodenoughtoletExcelfinditforYou.UsetheTINVfunction:=TINV
(alpha,df).
Inthiscase,ifwerelookingatanalphaof5%with8dfs,wedtypein=TINV(.05,8)andExcel
wouldprovideuswiththet*towhichwewillcompareourt.KeepinmindthatExcelusesatwo
tailedtest,soifwewanttouseaonetailedtest,thealphawouldhavetobeadjusted(bydoubling
it,right).
ExcelcanalsogiveYoutheexactprobabilityassociatedwiththesampletvalue.TheTDIST
functiondoesthis:TDIST(|ourT|,dfs,tails)sointhiscase=TDIST(1.1094,8,2).(ThevalueofourT
hastobepositive,butthatsnotaproblemsincethetdistributionissymmetrical,andpositiveand
negativetvaluesareequidistantfromthemean.Right?)
Sowhatstheprobabilityofgettingasamplemeanlikeours,ifthenullhypothesisistrue?
P(t(8)=1.1094)=

SohowwouldYouinterpretthisfinding?

OnesamplettestsinSPSS
OpenSPSSbyclickingtheSPSSiconinthedock.WhenitasksYouwhattoopen,pointittowardthe
fruitfly.savfileintheDatasetsfolderintheS1610qfolderonthedesktop.
This file contains data from a study published in Nature in 1981. Here is a description of the dataset:
A cost of increased reproduction in terms of reduced longevity has been shown for female
fruitflies, but not for males. The flies used were an outbred stock. Sexual activity was manipulated
by supplying individual males with one or eight receptive virgin females per day. The longevity of
these males was compared with that of two control types. The first control consisted of two sets of
individual males kept with one or eight newly inseminated females. Newly inseminated females
will not usually remate for at least two days, and thus served as a control for any effect of
competition with the male for food or space. The second control was a set of individual males
kept with no female. There were 25 males in each of the five groups, which were treated
identically in number of anaesthetizations (using CO2) and provision of fresh food medium.
Here is a description of the variables in your datafile:
ID:
serial no. (1-25) within each group of fruit flies (4 groups)
Partner:
number of companions (1 or 8)
Type:
type of companion (0: newly pregnant female; 1: virgin female)
Lifespan:
lifespan in days
Thorax:
length of thorax, in nm
Sleep:
percentage of each day spent sleeping
ONE SAMPLE STATISTICS
Lets look at lifespan first. Do sexually active fruit flies live longer than fruit flies that are not
sexually active? Use the GRAPHS menu to make a histogram of the lifespan. Does it look
normally distributed?

Now lets look at the sample statistics. Go to ANALYZE -> DESCRIPTIVE STATISTICS ->
DESCRIPTIVES and put in the lifespan variable. Get the mean and standard deviation.

Our data only includes information about fruit flies that have at least one partner. Thus, the mean and
standard deviation found in the previous step is for fruit flies with at least one partner. Do we think
this mean is significantly less than 63.5 (the lifespan in days of fruit flies that are not sexually active)?
Go to ANALYZE -> COMPARE MEANS -> ONE SAMPLE T TEST. Put in 63.5 for the test value
and see what the test shows you.

Potrebbero piacerti anche