statistics overview (for class) overview (for class).pdft-tables df (two- .20 .10.05 tailed) 4 1.533...
TRANSCRIPT
-
Statistics Review
PSY379
-
Basic concepts
• Measurement scales
• Populations vs.samples
• Continuous vs.discrete variable
• Independent vs.dependent variable
• Descriptive vs.inferential stats
Common analyses
• Independent T-test
• Paired T-test
• One-way ANOVA
• Two-way ANOVA
• Regression
-
Measurement Scales
Before we can examine a variable statistically, we
must first observe, or measure, the variable.
Measurement is the assignment of numbers to
observations based on certain rules.
Measurement attempts to transform attributes into
numbers.
How much is high vs. low stress? How much fast vs.
slow learning of a maze? How much is good vs. bad
memory?
-
Measurement Scales
• Non-metric (or qualitative)
Nominal scale (Categories):
Numbers indicate difference in kind; no order info
(e.g., ethnicity, gender, id#s)
Say that ‘men’ is assigned ‘0’ and ‘women’ is
assigned ‘1’; doesn’t mean 1 is better than 0
Ordinal scale (Orders):
Numbers represent rank orderings; distances are
not equal
(e.g., grades, rank orderings on a survey)
-
Measurement Scales
• Metric (or quantitative)
Interval scale:
Equal intervals, “arbitrary” zero
Ratios have no meaning
(e.g., temperature in degrees F;
50 - 30 F = 120 - 100 F; 60 F 2 X 30 F)
Ratio scale:
Equal intervals, absolute zero
Equal ratios are equivalent
(e.g., weight, height)
-
Populations vs. Samples
• Population: all members of a specific group.
parametric: a measure (e.g., mean and variance)
computed for the population
• Sample: a finite subset of a predefined population.
statistic: a measure (e.g., mean and variance)
computed for the sample
-
Continuous vs. Discrete
• Discrete variable:
one in which a measure can take on distinct values but not
intermediate values (e.g., number of children -- it is either
1 or 2, but not 1.2). The most common form of discrete
variable is based on counting.
• Continuous variable:
approximations of the exact value; it is not possible to
obtain the exact measure on a continuous variable,
because there are always infinitely smaller gradation of
measure (e.g., height – we can say someone is 72 inches
tall, but this is really approximating between 71.5 and
72.5 inches).
-
Independent vs. Dependent
• Independent variable:
one manipulated by the experimenter, or the
observed variable thought to cause or predict the
dependent variable. In the relation Y = f(X), X is
independent variable because the value of X does not
depend on the value of Y.
• Dependent variable:
one thought to result from the independent variable.
In the relation Y = f(X), Y is the dependent variable
because the value it takes on depends on the value of
X
-
Descriptive Statistics
- Descriptive Statistics (a.k.a. Summary Statistics)
- Primarily concerned with the summary and description
of a collection of data
- Serves to reduce a large and unmanageable set of data to
a smaller and more interpretable set of information
-
Descriptive Statistics
Frequency distribution & histogram
• a function that summarizes the membership of
individual observation to measurement classifications.
• Can be constructed regardless of whether the scale is
nominal, ordinal, interval or ratio, as long as each and
every observation goes into one and only one class.
-
Descriptive Statistics
One of the goals in stats is to compare distributions of data,
one data distribution with another data distribution.
This would be easier if each data distribution can be
summarized into one or two numbers.
Central Tendency & Variability
-- what is the descriptive central number and how much do
individual scores vary from the number?
-
Descriptive Statistics
Measures of Central Tendency
Mean: typical/average score, sensitive to extreme
scores
Median: middlemost score; useful for skewed
distribution
Mode: most “common or frequent” score
-
Descriptive Statistics
IQ scores
Fre
qu
en
cy
11410810296908478
100
80
60
40
20
0
-
Descriptive Statistics
Measures of Variability
Variance (dispersion or spread): degree of spread in
X (variable)
Standard deviation (SD): a measure of variability in
the original metric units of X (variable); the square
root of the variance
-
Variance
S2= (xi – x )2
n-1
x
-
Variance
S2= (xi – x )2
n-1
x
-
IQ score
Fre
qu
en
cy
15213311495765738
70
60
50
40
30
20
10
0
IQ scores
Fre
qu
en
cy
156.0136.5117.097.578.058.539.0
100
80
60
40
20
0
IQ score
Fre
qu
en
cy
16014012010080604020
100
80
60
40
20
0
IQ score
Fre
qu
en
cy
16014012010080604020
80
70
60
50
40
30
20
10
0
-
Other Measures
Skewness is a measure of symmetry, or more precisely,
the lack of symmetry.
Kurtosis is a measure of whether the data are peaked or
flat relative to a normal distribution. That is, data sets with
high kurtosis tend to have a distinct peak near the
mean, decline rather rapidly, and have heavy tails. Data
sets with low kurtosis tend to have a flat top near the mean
rather than a sharp peak.
-
Pop Quiz!
Variance is the average of the squared differences between
data points and the mean. Then why are the differences
squared?
Standard deviation is the square root of variance. Then
why is the variance square rooted?
-
Inferential Statistics
- A formalized method for solving a class of problems
relating to the inference of properties to a large set of
data from examination of a small set of data
- Goal is to predict or to estimate characteristics of a
population based on information obtained from a sample
drawn from that population
-
Inferential Statistics
We want to know about these: We have this to work with:
RandomSelection
Inference
Parameter Statistic
PopulationSample
(Population mean) (Sample mean)
-
Normal distribution
67% of data
within 1 SD of
mean
95% of data
within 2 SD of
mean
-
Poisson distribution
mean
Mostly, nothing happens (lots of zeros)
-
Basic concepts
• Measurement scales
• Populations vs.samples
• Continuous vs.discrete variable
• Independent vs.dependent variable
• Descriptive vs.inferential stats
Common analyses
• Independent T-test
• Paired T-test
• One-way ANOVA
• Two-way ANOVA
• Regression
-
Hypothesis testing
1. Assume ‘null hypothesis (H0)’ (e.g., the two sets of
samples come from the same population)
2. Construct ‘alternative hypothesis (H1)’ (e.g., the two
sets of samples do not come from the same
population)
3. Calculate ‘test statistic’
4. Decide on rejection region for null hypothesis (e.g.,
95% confidence in rejecting null hypothesis)
-
• Null (H0): no effect of our experimental
treatment, “status quo”
• Alternative (H1): there is an effect
Hypotheses
-
T-tests
• One sample t-test – compare a group to a known
value
(e.g., comparing the IQ of a specific group to the
known average of 100)
• Paired samples t-test – compare one group at two
points in time (e.g., comparing pretest and posttest
scores)
• Independent samples t-test – compare two groups to
each other
-
Paired t-test
More examples…
• Before-and-after observations on the same subjects
(e.g. students’ diagnostic test results before and after
a particular module or course)
• A comparison of two different methods of
measurement or two different treatments where the
measurements or treatments are applied to the same
subjects (e.g. blood pressure measurements)
-
Paired t-test
1. Calculate the difference between the two
observations on each pair, making sure you
distinguish between positive and negative
differences.
2. Calculate statistics (mean, SD etc.) for these
difference scores.
3. Calculate the t-statistic (T). Under the null
hypothesis, this statistic follows a t-distribution
with n 1 degrees of freedom (n = sample size).
4. Use tables of the t-distribution to compare your value
for T to the tn distribution.
-
Paired t-test
-316195
+224224
+117163
+425212
+422181
differencePost-testPre-testStudent
Example: Suppose a sample of n students were given a
diagnostic test before studying a particular subject and then
again after completing it.
-
Question: Do two samples come from
different populations?
Independent t-test
A B
DATA
NO YESH0
-
Depends on whether the difference betweensamples is much greater than difference withinsample.
Independent t-test
A B
A B
Between >> Within…
-
Degrees of freedom (df)
df = (number of independent observations) – (number of
restraints)
or
df = (number of independent observations) – (number of
population estimates)
df = (a) (n - 1)
a = number of different groups; n = number of
observations (i.e., sample size)
-
How many degrees of freedom when sample
sizes are different?
Independent t-test
(n1-1) + (n2-1)
-
T-tables
.05.10.20df (two-
tailed)
2.7762.1321.5334
1.9601.6451.282infinity
3.1822.3531.6383
4.3032.9201.8862
12.7066.3143.0781
.025.05.10df (one-
tailed)
Two samples, each n=3, with t-statistic of 2.50:
significantly different?
-
T-tables
.05.10.20df (two-
tailed)
2.7762.1321.5334
1.9601.6451.282infinity
3.1822.3531.6383
4.3032.9201.8862
12.7066.3143.0781
.025.05.10df (one-
tailed)
Two samples, each n=3, with t-statistic of 2.50:
significantly different? No!
-
General form of the t-test; can have more
than 2 samples
One-way (factor) ANOVA
H0:
All samples the same…
H1:
At least one sample
different
-
General form of the t-test; can have more
than 2 samples
One-way (factor) ANOVA
A B C
AB C
A BC
A BC
DATAH0 H1
-
Just like t-test, compares differences between
samples to differences within samples
One-way (factor) ANOVA
A B C
Difference between means
Standard error within sample
MS between groups
MS within group
T-test statistic (t)
ANOVA statistic (F)
-
ANOVA table
SSEdf (E)
SSX
df (X)
MS
MSXMSE
F
Look
up !
p
SSTdf (T)Total
SSEdf (E)Error
(within groups)
SSXdf (X)Treatment
(between groups)
SSdf
}
}
-
alpha = 0.05, F2,12 = 3.89
2.92
34.5
MS
11.8
F
?
p
10414Total
3512Error
(within groups)
692Treatment
(between groups)
SSdf
Suppose there are 3 groups of treatment (i.e., one factor with
three levels), and there are 5 observations per group.
-
Just like one-way ANOVA, except subdivides thetreatment SS into:
• Treatment 1
• Treatment 2
• Interaction between 1 & 2
Two-way ANOVA
-
Suppose there are two groups of treatment 1 and twogroups of treatment 2, and there are 10 observations ineach group:
• Treatment 1 (2 levels, so df = 1)
• Treatment 2 (2 levels, so df = 1)
• Treatment 1 x Treatment 2 interaction (1df x 1df = 1df)
• Error?
Two-way ANOVA
df = k(n-1) = 4 (10-1) = 36
-
MS(T1)
MSE
MS(T1)SS(T1)1Treatment 1
MS(T2)
MSE
MS(T2)SS(T2)1Treatment 2
MSE
MS(T1XT2)
MS
MS(Int)
MSE
F
SST39Total
SSE36Error
(within groups)
SS(T1XT2)1Treatment 1 x
Treatment 2
SSdfv
-
Combination of treatments gives additive effect
Interactions
Additive effect:
T1 level 1 T1 level2
T2 level2
T2 level2
-
Combination of treatments gives non-additive
effect
Interactions
Anything not parallel!
-
How to report
Independent t-test:
(Example)
There was no overall difference in performance on control RAT
items between younger and older adults, Ms = 0.39 and 0.32,
respectively, t(18) = 1.34, p > .05.
-
How to report
ANOVA (or F-test):
(Example)Reading time (in seconds) on the control story was compared to the mean
reading time for the four stories with distraction using a 2 (Age: young and
old) X 2 (Story Type: without and with distraction) ANOVA with age as a
between-subject variable and story type as a within-subject variable. Older
adults were slower overall than younger adults, M = 66.45 and 51.33,
respectively, F (1, 18) = 18.94, p < .01, the stories with distraction took
longer to read than the stories without distraction, M = 79.83 and 37.95,
respectively, F (1, 18) = 202.44, p < .01, and, in replication of the earlier
work, the slowdown between the stories with and without distraction was
greater for older than for younger adults, F (1, 18) = 7.43, p < .05.