SlideShare a Scribd company logo
1 of 63
COMPARING MEANS
Inferential Statistics
• Hypothesis testing
• Drawing conclusions about differences between groups
• Are differences likely due to chance?
• Comparing means
• t-test: 2 means
• Analysis of variance: 2 or more means ~
Are there differences?
• One of the fundament questions of survey research is if
there is a difference among respondents
• When seeking to evaluate differences in means, we can
use t-test or ANOVA = analysis of variance
4
Comparison of the z-test and t-test
• Interval or ratio scaled variables
• t-test
• When groups are small
• When population standard deviation is unknown
• z-test
• When groups are large
• σ is known
5
6
The t Statistic
• The t statistic allows researchers to use sample
data to test hypotheses about an unknown
population mean.
• The particular advantage of the t statistic, is that
the t statistic does not require any knowledge of
the population standard deviation.
• Thus, the t statistic can be used to test
hypotheses about a completely unknown
population; that is, both μ and σ are unknown,
and the only available information about the
population comes from the sample.
T-test
• Dependent t-test
– Compares two means based on related data.
– E.g., Data from the same people measured at different times.
– Data from ‘matched’ samples.
• Independent t-test
– Compares two means based on independent data
– E.g., data from different groups of people
• Significance testing
– Testing the significance of Pearson’s correlation coefficient
– Testing the significance of b in regression.
(c) 2007 IUPUI SPEA K300 (4392)
Type of the T-test
• One-sample t-test compares one sample
mean with a hypothesized value
• Paired sample t-test (dependent sample)
compares the means of two dependent
variables
• Independent sample t-test compares the
means of two independent variables
• Equal variance
• Unequal variance
Assumptions of the t-test
• Both the independent t-test and the dependent t-test are
parametric tests based on the normal distribution.
Therefore, they assume:
– The sampling distribution is normally distributed. In the dependent
t-test this means that the sampling distribution of the differences
between scores should be normal, not the scores themselves.
– Data are measured at least at the interval level.
• The independent t-test, because it is used to test different
groups of people, also assumes:
– Variances in these populations are roughly equal (homogeneity of
variance).
– Scores in different treatment conditions are independent (because
they come from different people).
The One-sample t-test
• Evaluating hypothesis about population
• taking a single sample
• Does it likely come from population?
• Test statistics
• z test if s known
• t test if s unknown ~
(c) 2007 IUPUI SPEA K300 (4392)
One sample t-test
• Compare a sample mean with a particular
(hypothesized) value
• H0: µ=c, Ha: µ≠c, where c is a particular value
• Degrees of freedom: n-1
)1(~ 

 nt
n
s
cx
tx
n
s
txc
n
s
tx 2/2/  
t statistic
X
s
X
t

 1 ndf
t-test
t =
observed difference
between sample means
−
expected difference
between population means
(if null hypothesis is true)
estimate of the standard error of the difference between two
sample means
(c) 2007 IUPUI SPEA K300 (4392)
Paired sample t-test 1
• Compare two paired (matched) samples.
• Ex. Compare means of pre- and post-
scores given a treatment. We want to know
the effect of treatment.
• Ex. Compare means of midterm and final
exam of K300.
• Each subject has data points (pre- and
post, or midterm and final)
(c) 2007 IUPUI SPEA K300 (4392)
Paired sample t-test 2
• Compute d=x1-x2 (order does not matter)
• H0: µd=c, Ha: µd≠c, where c is a particular value
(often 0)
• Degrees of freedom: n-1
n
d
d
i
1
)( 2
2


 
n
dd
s i
d
)1(~ 

 nt
n
s
cd
t
d
d
n
s
tdc
n
s
td dd
2/2/  
(c) 2007 IUPUI SPEA K300 (4392)
Paired sample t-test 3: Example
• Example: Cholesterol levels
• H0: µd=0, Ha: µd≠0
• N=5, dbar=16.7, std err=25.4,
• Test size=.01, df=4, critical value=2.015
• Test statistic is 1.61, which is smaller than CV
• Do not reject the null hypothesis. 1.61 is likely
when the null hypothesis is true.
)16(61.1~
6
4.25
07.160





n
s
d
t
d
d
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test
• Compare two independent samples
• Ex. Compare means of personal income between
Colombo and Jaffna
• Ex. Compare means of GPA between UOJ and
SJP
• Each variable include different subjects that are
not related at all
Independent sample t-test
•H0: μ1= μ2 or μ1 – μ2= 0
•H1: μ1≠ μ2 or μ1 – μ2 ≠ 0
(c) 2007 IUPUI SPEA K300 (4392)
How to get standard error?
• If variances of two sample are equal, use the
pooled variance.
• Otherwise, you have to use individual variance to
get the standard error of the mean difference (µ1-
µ2)
• How do we know two variances are equal?
• (Folded form) F test is the answer.
(c) 2007 IUPUI SPEA K300 (4392)
F-test for equal variance
• Compute variances of two samples
• Conduct the F-test as follows.
• Larger variance should be the numerator so that F is always
greater than or equal to 1.
• Look up the F distribution table with two degrees of freedom.
• degrees of freedom numerator (dfn) and degrees of
freedom denominator (dfd)
• If H0 of equal variance is not rejected, two samples have the
same variance.
2
2
2
10 : ss H
)1,1(~2
2
 SL
S
L
nnF
s
s
F-test for equal variance
• Look up the F distribution table with two degrees of
freedom.
• degrees of freedom numerator (dfn) and degrees of
freedom denominator (dfd)
• dfn = a-1
dfd = N-a
• where "a" is the number of groups and "N" is the total
number of subjects
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Equal variance
• Compare means of two independent samples
that have the same variance
• The null hypothesis is µ1-µ2=c (often 0)
• Degrees of freedom is n1+n2-2
2
)1()1(
2
)()(
21
2
22
2
11
21
2
22
2
112







nn
snsn
nn
yyyy
s
ji
pool
)2(~
11
)(
21
21
21



 nnt
nn
s
yy
t
pool
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Equal variance
• Example
• X1bar=$26,800, s1=$600, n1=10
• X2bar=$25,400, s2=$450, n2=8
• F-test: F 1.78 is smaller than CV 4.82; do not
reject the null hypothesis of equal variance at
the .01 level.
• Therefore, we can use the pooled variance.
)18,110(78.1~
450
600
2
2
2
2

S
L
s
s
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Equal variance
• X1bar=$26,800, s1=$600, n1=10
• X2bar=$25,400, s2=$450, n2=8
• Since 5.47>2.58 and p-value <.01, reject the H0
at the .01 level.
)2(~
11
)(
21
21
21



 nnt
nn
s
xx
t
pool
75.291093
2810
450)18(600)110(
2
)1()1( 22
21
2
22
2
112







nn
snsn
spool
)2810(47.5~
8
1
10
1
5.539
)2540026800(



t
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Unequal variance
• Compare means of two independent samples
that have different variances (if the null
hypothesis of the F-test is rejected)
• The null hypothesis is µ1-µ2=c (often 0)
• Individual variances need to be used
• Degrees of freedom is approximated; not
necessarily an integer
)(~
2
2
2
1
2
1
21
iteSatterthwadft
n
s
n
s
xx
t



(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Unequal variance
• Approximation of degrees of freedom
• Not necessarily an integer
• Satterthwait’s approximation (common)
• Cochran-Cox’s approximation
• Welch’s approximation
2
2
2
1
21
)1()1)(1(
)1)(1(
cncn
nn
df iteSatterthwa



2
2
21
2
1
1
2
1
nsns
ns
c


(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Unequal variance
• Example
• X1bar=191, s1=38, n1=8
• X2bar=199, s2=12, n2=10
• F-test: F 10.03 (7, 9) is larger than CV 4.20,
indicating unequal variances. Reject H0 of
equal variance at the .05 level.
• Therefore, we have to use individual variances
)110,18(03.10~
12
38
2
2
2
2

S
L
s
s
(c) 2007 IUPUI SPEA K300 (4392)
Independent sample t-test: Unequal variance
• Example
• X1bar=191, s1=38, n1=8
• X2bar=199, s2=12, n2=10
• Test statistics |-.57| is small.
• CV 2.365 for 7 (8-1) degrees of freedom and does not
reject the null hypothesis
• However, we need the approximation of degrees of
freedom to get more reliable df.
)(57.~
10
12
8
38
199191
22
2
2
2
1
2
1
21
iteSatterthwadf
n
s
n
s
xx
t 






(c) 2007 IUPUI SPEA K300 (4392)
Summary of Comparing Means
One sample
T-test
One
sample?
Dependent?
Equal
Variance?
Two
Paired sample
T-test
Independent
sample T-test
(Pooled variance)
Independent sample
T-test
(Approximation of d.f.)
Unequal
Independent
cH :0 0:0 dH  0: 210  H 0: 210  H
1 ndf 1 ndf 221  nndf edapproximatdf 
ANOVA – Analysis of Variance
• Statistical technique specially designed
to test whether the means of more than 2
quantitative populations are equal.
ANOVA – Analysis of Variance
• ANOVA is similar to regression in that it is used to
investigate and model the relationship between a
dependent (response) variable and one or more
independent (explanatory) variables.
• It is different
• the independent variables are qualitative (categorical)
• no assumption is made about the nature of the relationship
• ANOVA really extends the two-sample t-test for testing
the equality of two population means to a more
general null hypothesis of comparing the equality of
more than two means, versus them not all being
equal.
ANOVA – Analysis of Variance
• An analysis of variance (=ANOVA) is a statistical
method, to detect if there is a statistical difference
between the means of the populations.
• The null hypothesis in the simple ANOVA test is the
following:
• H0: μ1 = μ2 = … = μk
• Against the alternative
• H1: at least two μ’s differ
• The test statistic for ANOVA is the ANOVA F-statistic.
Example ANOVA research question
• Are there differences in the degree of religious
commitment between countries (UK, USA, and Australia)?
• 1-way ANOVA
• 1-way repeated measures ANOVA
• Factorial ANOVA
• Mixed ANOVA
• ANCOVA
Example ANOVA research question
• Do university students have different levels of satisfaction
for educational, social, and campus-related domains ?
• 1-way ANOVA
• 1-way repeated measures ANOVA
• Factorial ANOVA
• Mixed ANOVA
• ANCOVA
Example ANOVA research questions
• Are there differences in the degree of religious
commitment between countries(UK, USA, and Australia)
and gender (male and female)?
• 1-way ANOVA
• 1-way repeated measures ANOVA
• Factorial ANOVA
• Mixed ANOVA
• ANCOVA
Example ANOVA research questions
• Does couples' relationship satisfaction differ between
males and females and before and after having children?
• 1-way ANOVA
• 1-way repeated measures ANOVA
• Factorial ANOVA
• Mixed ANOVA
• ANCOVA
Example ANOVA research questions
• Are there differences in university student satisfaction
between males and females (gender) after controlling for
level of academic performance?
• 1-way ANOVA
• 1-way repeated measures ANOVA
• Factorial ANOVA
• Mixed ANOVA
• ANCOVA
ANOVA
• Variance can be separated into two major components
• Within groups – variability or differences in particular groups
(individual differences)
• Between groups - differences depending what group one is in or
what treatment is received
F test
• ANOVA partitions the sums of squares (variance from the
mean) into:
• Explained variance (between groups)
• Unexplained variance (within groups) – or
• error variance
F = ratio between explained & unexplained variance
p = probability that the observed mean differences between
groups could be attributable to chance
ONE WAY ANOVA
One-way ANOVA - Assumptions
• Dependent variable (DV) must be: Interval
or ratio
• Normality: Normally distributed for all
groups
• Variance: Equal variance across for all
groups (homogeneity of variance)
• Independence: Participants' data should be
independent of others' data
One-way ANOVA:
• Are there differences in satisfaction
levels between students who get
different grades?
ANOVA WITH EVIEWS
ANOVA – Analysis of Variance
• The sample mean and standard deviation is
calculated, by selecting the variable by double
clicking it and going View/ Descriptive
Statistics/Tests/Stats by classification..
The ANOVA test in Eviews
The ANOVA test in Eviews
• To determine whether to reject the null hypothesis or not
we focus on the highlighted ANOVA F-test output. The
column named Probability contains the p-value of interest.
Since the p-value is below 5% we reject the null
hypothesis and conclude that there is a statistical
significant difference in weight between the groups.
Testing assumptions
• A number of assumptions must be met to ensure the
validity of the above analysis of variance.
• The following three assumptions will be checked in this
section
• 1) Homogeneity of variance
• 2) Normally distributed errors
• 3) Independent error terms
Homogeneity of variance (1)
•To test for homogeneity of variance
between the different groups in the
analysis, we use Levene’s test for
equality of variance.
Homogeneity of variance (1)
• To have EViews run Levene’s test, is somewhat similar to
running the ANOVA test in the first place. Once again you
need to select the variable of interest
• View /Descriptive Statistics /Tests/Equality Tests by
Classification...
Homogeneity of variance (1)
• we get a p-value of 0.67, which is way above any
reasonable level of significance. Therefore we cannot
reject the null hypothesis and assumption of homogeneity
of variance is considered satisfied.
Normally distributed errors
• we address the assumption by creating distribution
histograms for each group.
Normally distributed errors
• Making cross group analysis is done by using Q-Q plots
to determine whether or not the observations follow a
normal distribution when analyzed within their group. To
make this analysis in EViews do the following:
• Select Quick > Graph from the top tool, which should
result in the following windows:
Normally distributed errors
• Within this windows type in the variable of interest
Normally distributed errors
• First you need to choose Categorical Graph from the
dropdown menu (1). Then select the specific graph
Quantile – Quantile (2), which is also known as the Q-Q
plot. To make Eviews create a separate graph for each
outcome in the grouping variable, you need to type in the
grouping variable in the Across Graphs window.
Quantile – Quantile
The output displays the perfect normal distribution
Independent error terms
• Assumptions concerning independent error terms is
simply done, by making scatter plots of the variable of
interest and the observation numbers. This is done to
ensure that a pattern related to order in which the sample
is collected, doesn’t exist.
• Select Quick/Graph and type in the variable of interest in
the resulting window and click OK.
63

More Related Content

What's hot

Hypothesis testing an introduction
Hypothesis testing an introductionHypothesis testing an introduction
Hypothesis testing an introduction
Geetika Gulyani
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed tests
Hasnain Baber
 
Inferential statistics.ppt
Inferential statistics.pptInferential statistics.ppt
Inferential statistics.ppt
Nursing Path
 

What's hot (20)

Analysis of variance anova
Analysis of variance anovaAnalysis of variance anova
Analysis of variance anova
 
Repeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of VarianceRepeated-Measures and Two-Factor Analysis of Variance
Repeated-Measures and Two-Factor Analysis of Variance
 
Non parametric test
Non parametric testNon parametric test
Non parametric test
 
Statistical inference concept, procedure of hypothesis testing
Statistical inference   concept, procedure of hypothesis testingStatistical inference   concept, procedure of hypothesis testing
Statistical inference concept, procedure of hypothesis testing
 
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA)
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
Hypothesis testing an introduction
Hypothesis testing an introductionHypothesis testing an introduction
Hypothesis testing an introduction
 
Chi square test final
Chi square test finalChi square test final
Chi square test final
 
One sided or one-tailed tests
One sided or one-tailed testsOne sided or one-tailed tests
One sided or one-tailed tests
 
Anova (f test) and mean differentiation
Anova (f test) and mean differentiationAnova (f test) and mean differentiation
Anova (f test) and mean differentiation
 
Anova by Hazilah Mohd Amin
Anova by Hazilah Mohd AminAnova by Hazilah Mohd Amin
Anova by Hazilah Mohd Amin
 
Correlation and Regression
Correlation and RegressionCorrelation and Regression
Correlation and Regression
 
4 measures of variability
4  measures of variability4  measures of variability
4 measures of variability
 
z-test
z-testz-test
z-test
 
Kolmogorov Smirnov
Kolmogorov SmirnovKolmogorov Smirnov
Kolmogorov Smirnov
 
The two sample t-test
The two sample t-testThe two sample t-test
The two sample t-test
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
Inferential statistics.ppt
Inferential statistics.pptInferential statistics.ppt
Inferential statistics.ppt
 
Probability
ProbabilityProbability
Probability
 
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
Parametric test  - t Test, ANOVA, ANCOVA, MANOVAParametric test  - t Test, ANOVA, ANCOVA, MANOVA
Parametric test - t Test, ANOVA, ANCOVA, MANOVA
 

Similar to Comparing means

jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgjhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
UMAIRASHFAQ20
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptx
DrLasya
 
New microsoft power point presentation
New microsoft power point presentationNew microsoft power point presentation
New microsoft power point presentation
Chotaliya Jay
 

Similar to Comparing means (20)

t distribution, paired and unpaired t-test
t distribution, paired and unpaired t-testt distribution, paired and unpaired t-test
t distribution, paired and unpaired t-test
 
F test and ANOVA
F test and ANOVAF test and ANOVA
F test and ANOVA
 
t Test- Thiyagu
t Test- Thiyagut Test- Thiyagu
t Test- Thiyagu
 
Parametric tests
Parametric testsParametric tests
Parametric tests
 
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdfDr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
Dr.Dinesh-BIOSTAT-Tests-of-significance-1-min.pdf
 
Unit 4
Unit 4Unit 4
Unit 4
 
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhgjhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
jhghgjhgjhgjhfhcgjfjhvjhjgjkggjhgjhgjhfjgjgfgfhgfhg
 
Statistical analysis
Statistical  analysisStatistical  analysis
Statistical analysis
 
Statistical analysis.pptx
Statistical analysis.pptxStatistical analysis.pptx
Statistical analysis.pptx
 
Student t test
Student t testStudent t test
Student t test
 
Lecture slides stats1.13.l15.air
Lecture slides stats1.13.l15.airLecture slides stats1.13.l15.air
Lecture slides stats1.13.l15.air
 
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-testHypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
Hypothesis Test _Two-sample t-test, Z-test, Proportion Z-test
 
Workshop on Data Analysis and Result Interpretation in Social Science Researc...
Workshop on Data Analysis and Result Interpretation in Social Science Researc...Workshop on Data Analysis and Result Interpretation in Social Science Researc...
Workshop on Data Analysis and Result Interpretation in Social Science Researc...
 
statistics introduction
 statistics introduction statistics introduction
statistics introduction
 
NON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptxNON-PARAMETRIC TESTS.pptx
NON-PARAMETRIC TESTS.pptx
 
UNIT 5.pptx
UNIT 5.pptxUNIT 5.pptx
UNIT 5.pptx
 
T test^jsample size^j ethics
T test^jsample size^j ethicsT test^jsample size^j ethics
T test^jsample size^j ethics
 
New microsoft power point presentation
New microsoft power point presentationNew microsoft power point presentation
New microsoft power point presentation
 
Test of significance in Statistics
Test of significance in StatisticsTest of significance in Statistics
Test of significance in Statistics
 
Non parametric-tests
Non parametric-testsNon parametric-tests
Non parametric-tests
 

More from University of Jaffna (16)

Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
Test of hypotheses
Test of hypothesesTest of hypotheses
Test of hypotheses
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Descriptive statistics
Descriptive statisticsDescriptive statistics
Descriptive statistics
 
Correlation
CorrelationCorrelation
Correlation
 
Data presentation
Data presentationData presentation
Data presentation
 
Intro to stats
Intro to statsIntro to stats
Intro to stats
 
Capital stucture copy
Capital stucture   copyCapital stucture   copy
Capital stucture copy
 
Overview of cost & Management Accounting
Overview of cost & Management AccountingOverview of cost & Management Accounting
Overview of cost & Management Accounting
 
Service portfolio structure & firm performance
Service portfolio structure & firm performanceService portfolio structure & firm performance
Service portfolio structure & firm performance
 
Impact of leverage on shareholders’ return (1)
Impact of leverage on shareholders’ return (1)Impact of leverage on shareholders’ return (1)
Impact of leverage on shareholders’ return (1)
 
Comparison of strategic plan of cbsl & sbp
Comparison of strategic plan of cbsl & sbpComparison of strategic plan of cbsl & sbp
Comparison of strategic plan of cbsl & sbp
 
srilankan apparel industry
srilankan apparel industrysrilankan apparel industry
srilankan apparel industry
 
business failures in Jaffna
business failures in Jaffnabusiness failures in Jaffna
business failures in Jaffna
 
tax administration in srilanka
tax administration in srilankatax administration in srilanka
tax administration in srilanka
 
lkas 21
lkas 21lkas 21
lkas 21
 

Recently uploaded

如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh +966572737505 get cytotec
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
jk0tkvfv
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
yulianti213969
 

Recently uploaded (20)

Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Predictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting TechniquesPredictive Precipitation: Advanced Rain Forecasting Techniques
Predictive Precipitation: Advanced Rain Forecasting Techniques
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
jll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdfjll-asia-pacific-capital-tracker-1q24.pdf
jll-asia-pacific-capital-tracker-1q24.pdf
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Pentesting_AI and security challenges of AI
Pentesting_AI and security challenges of AIPentesting_AI and security challenges of AI
Pentesting_AI and security challenges of AI
 
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
 
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
ℂall Girls In Navi Mumbai Hire Me Neha 9910780858 Top Class ℂall Girl Serviℂe...
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
Introduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptxIntroduction to Statistics Presentation.pptx
Introduction to Statistics Presentation.pptx
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 

Comparing means

  • 2. Inferential Statistics • Hypothesis testing • Drawing conclusions about differences between groups • Are differences likely due to chance? • Comparing means • t-test: 2 means • Analysis of variance: 2 or more means ~
  • 3. Are there differences? • One of the fundament questions of survey research is if there is a difference among respondents • When seeking to evaluate differences in means, we can use t-test or ANOVA = analysis of variance
  • 4. 4 Comparison of the z-test and t-test • Interval or ratio scaled variables • t-test • When groups are small • When population standard deviation is unknown • z-test • When groups are large • σ is known
  • 5. 5
  • 6. 6 The t Statistic • The t statistic allows researchers to use sample data to test hypotheses about an unknown population mean. • The particular advantage of the t statistic, is that the t statistic does not require any knowledge of the population standard deviation. • Thus, the t statistic can be used to test hypotheses about a completely unknown population; that is, both μ and σ are unknown, and the only available information about the population comes from the sample.
  • 7. T-test • Dependent t-test – Compares two means based on related data. – E.g., Data from the same people measured at different times. – Data from ‘matched’ samples. • Independent t-test – Compares two means based on independent data – E.g., data from different groups of people • Significance testing – Testing the significance of Pearson’s correlation coefficient – Testing the significance of b in regression.
  • 8. (c) 2007 IUPUI SPEA K300 (4392) Type of the T-test • One-sample t-test compares one sample mean with a hypothesized value • Paired sample t-test (dependent sample) compares the means of two dependent variables • Independent sample t-test compares the means of two independent variables • Equal variance • Unequal variance
  • 9. Assumptions of the t-test • Both the independent t-test and the dependent t-test are parametric tests based on the normal distribution. Therefore, they assume: – The sampling distribution is normally distributed. In the dependent t-test this means that the sampling distribution of the differences between scores should be normal, not the scores themselves. – Data are measured at least at the interval level. • The independent t-test, because it is used to test different groups of people, also assumes: – Variances in these populations are roughly equal (homogeneity of variance). – Scores in different treatment conditions are independent (because they come from different people).
  • 10. The One-sample t-test • Evaluating hypothesis about population • taking a single sample • Does it likely come from population? • Test statistics • z test if s known • t test if s unknown ~
  • 11. (c) 2007 IUPUI SPEA K300 (4392) One sample t-test • Compare a sample mean with a particular (hypothesized) value • H0: µ=c, Ha: µ≠c, where c is a particular value • Degrees of freedom: n-1 )1(~    nt n s cx tx n s txc n s tx 2/2/  
  • 13. t-test t = observed difference between sample means − expected difference between population means (if null hypothesis is true) estimate of the standard error of the difference between two sample means
  • 14. (c) 2007 IUPUI SPEA K300 (4392) Paired sample t-test 1 • Compare two paired (matched) samples. • Ex. Compare means of pre- and post- scores given a treatment. We want to know the effect of treatment. • Ex. Compare means of midterm and final exam of K300. • Each subject has data points (pre- and post, or midterm and final)
  • 15. (c) 2007 IUPUI SPEA K300 (4392) Paired sample t-test 2 • Compute d=x1-x2 (order does not matter) • H0: µd=c, Ha: µd≠c, where c is a particular value (often 0) • Degrees of freedom: n-1 n d d i 1 )( 2 2     n dd s i d )1(~    nt n s cd t d d n s tdc n s td dd 2/2/  
  • 16. (c) 2007 IUPUI SPEA K300 (4392) Paired sample t-test 3: Example • Example: Cholesterol levels • H0: µd=0, Ha: µd≠0 • N=5, dbar=16.7, std err=25.4, • Test size=.01, df=4, critical value=2.015 • Test statistic is 1.61, which is smaller than CV • Do not reject the null hypothesis. 1.61 is likely when the null hypothesis is true. )16(61.1~ 6 4.25 07.160      n s d t d d
  • 17.
  • 18. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test • Compare two independent samples • Ex. Compare means of personal income between Colombo and Jaffna • Ex. Compare means of GPA between UOJ and SJP • Each variable include different subjects that are not related at all
  • 19. Independent sample t-test •H0: μ1= μ2 or μ1 – μ2= 0 •H1: μ1≠ μ2 or μ1 – μ2 ≠ 0
  • 20. (c) 2007 IUPUI SPEA K300 (4392) How to get standard error? • If variances of two sample are equal, use the pooled variance. • Otherwise, you have to use individual variance to get the standard error of the mean difference (µ1- µ2) • How do we know two variances are equal? • (Folded form) F test is the answer.
  • 21. (c) 2007 IUPUI SPEA K300 (4392) F-test for equal variance • Compute variances of two samples • Conduct the F-test as follows. • Larger variance should be the numerator so that F is always greater than or equal to 1. • Look up the F distribution table with two degrees of freedom. • degrees of freedom numerator (dfn) and degrees of freedom denominator (dfd) • If H0 of equal variance is not rejected, two samples have the same variance. 2 2 2 10 : ss H )1,1(~2 2  SL S L nnF s s
  • 22. F-test for equal variance • Look up the F distribution table with two degrees of freedom. • degrees of freedom numerator (dfn) and degrees of freedom denominator (dfd) • dfn = a-1 dfd = N-a • where "a" is the number of groups and "N" is the total number of subjects
  • 23.
  • 24. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Equal variance • Compare means of two independent samples that have the same variance • The null hypothesis is µ1-µ2=c (often 0) • Degrees of freedom is n1+n2-2 2 )1()1( 2 )()( 21 2 22 2 11 21 2 22 2 112        nn snsn nn yyyy s ji pool )2(~ 11 )( 21 21 21     nnt nn s yy t pool
  • 25. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Equal variance • Example • X1bar=$26,800, s1=$600, n1=10 • X2bar=$25,400, s2=$450, n2=8 • F-test: F 1.78 is smaller than CV 4.82; do not reject the null hypothesis of equal variance at the .01 level. • Therefore, we can use the pooled variance. )18,110(78.1~ 450 600 2 2 2 2  S L s s
  • 26. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Equal variance • X1bar=$26,800, s1=$600, n1=10 • X2bar=$25,400, s2=$450, n2=8 • Since 5.47>2.58 and p-value <.01, reject the H0 at the .01 level. )2(~ 11 )( 21 21 21     nnt nn s xx t pool 75.291093 2810 450)18(600)110( 2 )1()1( 22 21 2 22 2 112        nn snsn spool )2810(47.5~ 8 1 10 1 5.539 )2540026800(    t
  • 27. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Unequal variance • Compare means of two independent samples that have different variances (if the null hypothesis of the F-test is rejected) • The null hypothesis is µ1-µ2=c (often 0) • Individual variances need to be used • Degrees of freedom is approximated; not necessarily an integer )(~ 2 2 2 1 2 1 21 iteSatterthwadft n s n s xx t   
  • 28. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Unequal variance • Approximation of degrees of freedom • Not necessarily an integer • Satterthwait’s approximation (common) • Cochran-Cox’s approximation • Welch’s approximation 2 2 2 1 21 )1()1)(1( )1)(1( cncn nn df iteSatterthwa    2 2 21 2 1 1 2 1 nsns ns c  
  • 29. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Unequal variance • Example • X1bar=191, s1=38, n1=8 • X2bar=199, s2=12, n2=10 • F-test: F 10.03 (7, 9) is larger than CV 4.20, indicating unequal variances. Reject H0 of equal variance at the .05 level. • Therefore, we have to use individual variances )110,18(03.10~ 12 38 2 2 2 2  S L s s
  • 30. (c) 2007 IUPUI SPEA K300 (4392) Independent sample t-test: Unequal variance • Example • X1bar=191, s1=38, n1=8 • X2bar=199, s2=12, n2=10 • Test statistics |-.57| is small. • CV 2.365 for 7 (8-1) degrees of freedom and does not reject the null hypothesis • However, we need the approximation of degrees of freedom to get more reliable df. )(57.~ 10 12 8 38 199191 22 2 2 2 1 2 1 21 iteSatterthwadf n s n s xx t       
  • 31. (c) 2007 IUPUI SPEA K300 (4392) Summary of Comparing Means One sample T-test One sample? Dependent? Equal Variance? Two Paired sample T-test Independent sample T-test (Pooled variance) Independent sample T-test (Approximation of d.f.) Unequal Independent cH :0 0:0 dH  0: 210  H 0: 210  H 1 ndf 1 ndf 221  nndf edapproximatdf 
  • 32. ANOVA – Analysis of Variance • Statistical technique specially designed to test whether the means of more than 2 quantitative populations are equal.
  • 33. ANOVA – Analysis of Variance • ANOVA is similar to regression in that it is used to investigate and model the relationship between a dependent (response) variable and one or more independent (explanatory) variables. • It is different • the independent variables are qualitative (categorical) • no assumption is made about the nature of the relationship • ANOVA really extends the two-sample t-test for testing the equality of two population means to a more general null hypothesis of comparing the equality of more than two means, versus them not all being equal.
  • 34. ANOVA – Analysis of Variance • An analysis of variance (=ANOVA) is a statistical method, to detect if there is a statistical difference between the means of the populations. • The null hypothesis in the simple ANOVA test is the following: • H0: μ1 = μ2 = … = μk • Against the alternative • H1: at least two μ’s differ • The test statistic for ANOVA is the ANOVA F-statistic.
  • 35. Example ANOVA research question • Are there differences in the degree of religious commitment between countries (UK, USA, and Australia)? • 1-way ANOVA • 1-way repeated measures ANOVA • Factorial ANOVA • Mixed ANOVA • ANCOVA
  • 36. Example ANOVA research question • Do university students have different levels of satisfaction for educational, social, and campus-related domains ? • 1-way ANOVA • 1-way repeated measures ANOVA • Factorial ANOVA • Mixed ANOVA • ANCOVA
  • 37. Example ANOVA research questions • Are there differences in the degree of religious commitment between countries(UK, USA, and Australia) and gender (male and female)? • 1-way ANOVA • 1-way repeated measures ANOVA • Factorial ANOVA • Mixed ANOVA • ANCOVA
  • 38. Example ANOVA research questions • Does couples' relationship satisfaction differ between males and females and before and after having children? • 1-way ANOVA • 1-way repeated measures ANOVA • Factorial ANOVA • Mixed ANOVA • ANCOVA
  • 39. Example ANOVA research questions • Are there differences in university student satisfaction between males and females (gender) after controlling for level of academic performance? • 1-way ANOVA • 1-way repeated measures ANOVA • Factorial ANOVA • Mixed ANOVA • ANCOVA
  • 40. ANOVA • Variance can be separated into two major components • Within groups – variability or differences in particular groups (individual differences) • Between groups - differences depending what group one is in or what treatment is received
  • 41. F test • ANOVA partitions the sums of squares (variance from the mean) into: • Explained variance (between groups) • Unexplained variance (within groups) – or • error variance F = ratio between explained & unexplained variance p = probability that the observed mean differences between groups could be attributable to chance
  • 43. One-way ANOVA - Assumptions • Dependent variable (DV) must be: Interval or ratio • Normality: Normally distributed for all groups • Variance: Equal variance across for all groups (homogeneity of variance) • Independence: Participants' data should be independent of others' data
  • 44. One-way ANOVA: • Are there differences in satisfaction levels between students who get different grades?
  • 45.
  • 46.
  • 48. ANOVA – Analysis of Variance • The sample mean and standard deviation is calculated, by selecting the variable by double clicking it and going View/ Descriptive Statistics/Tests/Stats by classification..
  • 49. The ANOVA test in Eviews
  • 50. The ANOVA test in Eviews • To determine whether to reject the null hypothesis or not we focus on the highlighted ANOVA F-test output. The column named Probability contains the p-value of interest. Since the p-value is below 5% we reject the null hypothesis and conclude that there is a statistical significant difference in weight between the groups.
  • 51. Testing assumptions • A number of assumptions must be met to ensure the validity of the above analysis of variance. • The following three assumptions will be checked in this section • 1) Homogeneity of variance • 2) Normally distributed errors • 3) Independent error terms
  • 52. Homogeneity of variance (1) •To test for homogeneity of variance between the different groups in the analysis, we use Levene’s test for equality of variance.
  • 53. Homogeneity of variance (1) • To have EViews run Levene’s test, is somewhat similar to running the ANOVA test in the first place. Once again you need to select the variable of interest • View /Descriptive Statistics /Tests/Equality Tests by Classification...
  • 54. Homogeneity of variance (1) • we get a p-value of 0.67, which is way above any reasonable level of significance. Therefore we cannot reject the null hypothesis and assumption of homogeneity of variance is considered satisfied.
  • 55. Normally distributed errors • we address the assumption by creating distribution histograms for each group.
  • 56. Normally distributed errors • Making cross group analysis is done by using Q-Q plots to determine whether or not the observations follow a normal distribution when analyzed within their group. To make this analysis in EViews do the following: • Select Quick > Graph from the top tool, which should result in the following windows:
  • 57. Normally distributed errors • Within this windows type in the variable of interest
  • 58. Normally distributed errors • First you need to choose Categorical Graph from the dropdown menu (1). Then select the specific graph Quantile – Quantile (2), which is also known as the Q-Q plot. To make Eviews create a separate graph for each outcome in the grouping variable, you need to type in the grouping variable in the Across Graphs window.
  • 59. Quantile – Quantile The output displays the perfect normal distribution
  • 60. Independent error terms • Assumptions concerning independent error terms is simply done, by making scatter plots of the variable of interest and the observation numbers. This is done to ensure that a pattern related to order in which the sample is collected, doesn’t exist. • Select Quick/Graph and type in the variable of interest in the resulting window and click OK.
  • 61.
  • 62.
  • 63. 63