1 Statistics Review PSY379
2 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
3 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?
4 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)
5 Measurement Scales Metric (or quantitative) Interval scale: Equal intervals, arbitrary zero Ratios have no meaning (e.g., temperature in degrees F; F = F; 60 F 2 X 30 F) Ratio scale: Equal intervals, absolute zero Equal ratios are equivalent (e.g., weight, height)
6 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
7 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).
8 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
9 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
10 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.
11 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?
12 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
13 Descriptive Statistics Frequency IQ scores
14 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
15 Variance S 2 = (x i x ) 2 n-1 x
16 Variance S 2 = (x i x ) 2 n-1 x
17 IQ score Frequency IQ scores Frequency IQ score Frequency IQ score Frequency
18 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.
19 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?
20 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
21 Inferential Statistics We want to know about these: We have this to work with: Random Selection Population Sample Parameter Inference Statistic (Population mean) (Sample mean)
22 Normal distribution 67% of data within 1 SD of mean 95% of data within 2 SD of mean
23 Poisson distribution mean Mostly, nothing happens (lots of zeros)
24 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
25 Hypothesis testing 1. Assume null hypothesis (H 0 ) (e.g., the two sets of samples come from the same population) 2. Construct alternative hypothesis (H 1 ) (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)
26 Hypotheses Null (H 0 ): no effect of our experimental treatment, status quo Alternative (H 1 ): there is an effect
27 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
28 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)
29 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 t n distribution.
30 Paired t-test Example: Suppose a sample of n students were given a diagnostic test before studying a particular subject and then again after completing it. Student Pre-test Post-test difference
31 Independent t-test Question: Do two samples come from different populations? NO H 0 DATA YES A B
32 Independent t-test Depends on whether the difference between samples is much greater than difference within sample. A B Between >> Within A B
33 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)
34 Independent t-test How many degrees of freedom when sample sizes are different? (n 1-1) + (n 2-1)
35 T-tables df (twotailed) df (onetailed) Two samples, each n=3, with t-statistic of 2.50: infinity significantly different? 1.960
36 T-tables df (twotailed) df (onetailed) Two samples, each n=3, with t-statistic of 2.50: infinity significantly different? No! 1.960
38 One-way (factor) ANOVA General form of the t-test; can have more than 2 samples H 0 : All samples the same H 1 : At least one sample different
39 One-way (factor) ANOVA General form of the t-test; can have more than 2 samples A B C H DATA 0 AB C H 1 A BC AC B
40 One-way (factor) ANOVA Just like t-test, compares differences between samples to differences within samples A B C T-test statistic (t) ANOVA statistic (F) Difference between means Standard error within sample MS between groups MS within group
41 ANOVA table df SS MS F p Treatment (between groups) df (X) SSX SSX df (X) } MS X MS E Look up! Error (within groups) df (E) SS E SS E df (E) } Total df (T) SS T
42 Suppose there are 3 groups of treatment (i.e., one factor with three levels), and there are 5 observations per group. alpha = 0.05, F 2,12 = 3.89 df SS MS F p Treatment (between groups) ? Error (within groups) Total
43 Two-way ANOVA Just like one-way ANOVA, except subdivides the treatment SS into: Treatment 1 Treatment 2 Interaction between 1 & 2
44 Two-way ANOVA Suppose there are two groups of treatment 1 and two groups of treatment 2, and there are 10 observations in each 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? df = k(n-1) = 4 (10-1) = 36
45 v df SS MS F Treatment 1 1 SS(T1) MS(T1) MS(T1) MS E Treatment 2 1 SS(T2) MS(T2) MS(T2) MS E Treatment 1 x Treatment 2 1 SS(T1XT2) MS(T1XT2) MS(Int) MS E Error (within groups) 36 SS E MS E Total 39 SS T
46 Interactions Combination of treatments gives additive effect Additive effect: T2 level2 T2 level2 T1 level 1 T1 level2
47 Interactions Combination of treatments gives non-additive effect Anything not parallel!
48 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.
49 ANOVA (or F-test): How to report (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 = 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 = and 37.95, respectively, F (1, 18) = , 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.