Académique Documents
Professionnel Documents
Culture Documents
Syntax
options1
Description
-----------------------------------------------------------------------Main * by(groupvar) unequal welch level(#) variable defining the groups unpaired data have unequal variances use Welch's approximation set confidence level; default is level(95)
options2
Description
-----------------------------------------------------------------------Main unequal welch unpaired data have unequal variances use Welch's approximation
level(#)
------------------------------------------------------------------------
Menu
one-sample
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > One-sample mean-comparison test
two-sample, unpaired
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > Two-sample mean-comparison test
two-sample, paired
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > Mean-comparison test, paired data
two-group
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > Two-group mean-comparison test
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > One-sample mean-comparison calculator
Statistics > Summaries, tables, and tests > Classical tests of hypotheses > Two-sample mean-comparison calculator
Description
ttest performs t tests on the equality of means. ttest tests that varname has a mean of #.
tests that varname1 and varname2 have the same mean, assuming unpaired data. the same mean, assuming paired data. In the fourth form, ttest tests that In the third form, ttest tests that varname1 and varname2 have
varname has the same mean within the two groups defined by groupvar.
For the equivalent of a two-sample t test with sampling weights (pweights), use the svy: mean command with the over() option, and then use lincom; also see [SVY] svy postestimation.
Options
by(groupvar) specifies the groupvar that defines the two groups that ttest will use to test the hypothesis that their means are equal. Specifying by(groupvar) implies an unpaired (two sample) t test. Do not confuse the by() option with the by prefix; you can specify both.
The unpaired
option is used when the two set of values to be compared are in different variables.
unequal specifies that the unpaired data not be assumed to have equal variances.
welch specifies that the approximate degrees of freedom for the test be obtained from Welch's formula (1947) rather than Satterthwaite's approximation formula (1946), which is the default when unequal is specified. Specifying welch implies unequal.
level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95) or as set by set level.
Examples
(no setup required) . ttesti 24 62.6 15.8 75 (immediate form; n=24, m=62.6, sd=15.8; test m=75)
Saved results
Scalars r(N_1) r(N_2) r(p_l) r(p_u) r(p) r(se) r(t) r(sd_1) sample size n_1 sample size n_2 lower one-sided p-value upper one-sided p-value two-sided p-value estimate of standard error t statistic standard deviation for first variable
standard deviation for second variable combined standard deviation x_1 bar, mean for population 1 x_2 bar, mean for population 2 degrees of freedom
References
Welch, B. L. 1947.
Bamsz rneklem t-testinde ise tek rneklem t-testinden farkl olarak iki ayr grubun ortalamalar karlatrlr. rnein feminizm konusunda hakknda erkek ve kadnlarn grleri arasnda fark olup olmadn test etmek isterseniz bamsz rneklem t-testini kullanabilirsiniz. Benzer ekilde evli ve bekar kadnlarn kozmetik harcamalar arasnda fark olup olmadn bulmak iin kullanlabilecek yntem yine bamsz rneklem t-testidir.
imdi Bamsz rneklem t Testinin nasl uygulandn bir rnek zerinde inceleyelim.
rnek: Bir snfta kz ve erkek rencilerin matematik dersinden aldklar notlar arasnda anlaml bir fark var mdr?
H0 = Kz ve erkek rencilerin matematik dersinden aldklar notlar arasnda anlaml bir fark yoktur.
H1 = Kz ve erkek rencilerin matematik dersinden aldklar notlar arasnda anlaml bir fark vardr.
Karnza aadaki Independent-Sample T Test iletiim penceresi gelecektir. Bu pencereden inceleyeceiniz deikeni (rnekte, Matematik Notu) Test Variable(s) kutucuunun iine, gruplandrmada kullanacanz deikeni (rnekte, Cinsiyet) Grouping Variable satrna, aradaki oklar kullanarak gnderin.
imdi kullanacanz gruplar tanmlamanz gerek. Bunun iin Define Groups dmesini tklayn. Karnza aadaki iletiim kutusu gelecektir. Burada Kzlar 1, Erkeler 2 ile temsil edildiinden bu rakamlar Group 1 ve Group 2 satrlarna girdik. Bunun dnda rnein gruplamay Eitim Dzeyi deikenine gre yapmay dndnz ve niversite mezunlar ile lisansst eitim grenler karlatrmak istiyorsunuz. Kodlarnzda 1 lkretim, 2 Lise, 3 niversite 4Lisanst eklinde olsun bu durumda Group 1 ve Group 2 satrlarna srasyla 3 ve 4 rakamlarn girmeniz gerekecek. Eer lise ve daha az eitim grmler ile niversite ve daha yksek eitime sahip olanlar karlatrmak istiyorsanz Cut point ifadesinin nndeki radyo dmesini iaretlemeniz ve bu satra 2 deerini girmeniz yeterli olacaktr. SPSS Cut point satrna girilen deeri < = (kk eit) olarak kabul eder.
imdi rneimize dnelim. Srasyla Continue ve OK tularn tklaynz. Karnza aadakiler benzer tablolar gelecektir.
Group Statistics tablosunda her bir grupta ka kii bulunduu, bunlarn ortalama deerleri (rnekte, Matematik dersinden aldklar ortalama puanlar) ile bunlara ait standart sapma ve standart hata deerleri yer almaktadr.
Tabloda kzlarn ortalamasnn erkeklerden daha yksek olduu grlmektedir. Ancak bu farkn rastlantsal m yoksa gerek bir baarnn gstergesi mi olduunu belirleyebilmek iin Independent Samples Test tablosunu incelememiz gerekir.
Independent Samples Test tablosunun Sig. (Anlamllk) stunundaki deerin 0,29 olduu grlmektedir. Sz konusu deer 0,05den kk olduu iin, cinsiyet ile matematik dersi baars arasndaki ilikinin p < 0,05 dzeyinde istatistiksel olarak anlaml olduunu syleyebiliriz.
rneimizde t-testi sonular ve gruplara ait ortamlalar birlikte deerlendirildiinde, H0 hipotezi reddedilmi ve kz rencilerin matematik dersinde erkelerden daha baarl olduu sonucuna ulalmtr.