Inferential Statistics Research is about trying to make
Inferential Statistics Research is about trying to make valid inferences n n Inferential statistics: The part of statistics that allows researchers to generalize their findings beyond data collected. Statistical inference: a procedure for making inferences or generalizations about a larger population from a sample of that population
How Statistical Inference Works
Basic Terminology n Population (statistical population): Any collection of entities that have at least one characteristic in common A collection (a aggregate) of measurement about which an inference is desired Everything you wish to study n Parameter: The numbers that describe characteristics of scores in the population (mean, variance, standard deviation, correlation coefficient etc. )
Body Weight Data (Kg) P o p u l a t i o n A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 N = 28 μ = 44 σ² = 1. 214 44 44
Basic Terminology n n Sample: A part of the population A finite number of measurements chosen from a population Statistics: The numbers that describe characteristics of scores in the sample (mean, variance, standard deviation, correlation coefficient, reliability coefficient, etc. )
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 n = 1 value … X: student body weight X 1: 43 44 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 n = 2 values … X: student body weight x 1: 43 x 2: 44 44 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 44 43 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 n = 3 values … X: student body weight x 1: 43 x 2: 44 x 3: 45 44 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 n = 4 values … x: student body weight x 1: 43 x 2: 44 x 3: 45 x 4: 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 5 values … a sample that has been selected in such a way that all members of the population have an equal chance of being picked (A Simple Random Sample ) x 1: 43 x 2: 44 x 3: 45 x 4: 44 x 5: 44
Basic concept of statistics ü Measures of central tendency Measures of central ü Measures of dispersion & variability
Measures of tendency central Arithmetic mean (= simple average) • Best estimate of population mean is the sample mean, X summation measurement in population index of measurement sample size
Measures of variability All describe how “spread out” the data 1. Sum of squares, sum of squared deviations from the mean • For a sample,
2. Average or mean sum of squares = variance, s 2: • For a sample, Why?
n n – 1 represents the degrees of freedom, , or number of independent quantities in the estimate s 2. Greek letter “nu” • therefore, once n – 1 of all deviations are specified, the last deviation is already determined.
• Variance has squared measurement units – to regain original units, take the square root 3. Standard deviation, s • For a sample,
4. Standard error of the mean • For a sample, Standard error of the mean is a measure of variability among the means of repeated samples from a population.
Basic Statistical Symbols
Body Weight Data (Kg) P o p u l a t i o n A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 N = 28 μ = 44 σ² = 1. 214 44 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values … 43
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values … 43 44
Body Weight Data (Kg) A Population of Values 43 44 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values … 43 44 45
Body Weight Data (Kg) A Population of Values 43 44 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values … 43 44 45 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values … 43 44 45 44 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 repeated random sampling , each with sample size, n = 5 values …
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 46
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 46 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 46 44 46
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 46 44 46 45
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 46 44 46 45 44
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values …
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 42
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 42 42
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 42 42 43
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 42 42 43 45
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values … 42 42 43 45 43
Body Weight Data (Kg) A Population of Values 44 43 44 45 43 44 42 46 44 43 44 44 42 43 44 43 43 46 45 44 43 44 45 46 44 44 Repeated random samples, each with sample size, n = 5 values …
Summary Sample Sampling 1 Sampling 2 First Second Third 43 (-1) 44 (+0) 45 (+1) 46 (+1) 44 (-1) 46 (+1) 42 (-1) 43 (+0) Fourth Fifth 44 (+0) 45 (+0) 44 (-1) 45 (+2) 43 (+0) 44 2 0. 50 0. 707 45 4 1. 00 43 6 1. 50 1. 225 Average Sum of square Mean square Standard deviation
For a large enough number of large samples, the frequency distribution of the sample means (= sampling distribution), approaches a normal distribution.
Normal distribution: bell-shaped curve
Testing statistical hypotheses between 2 means 1. State the research question in terms of statistical hypotheses. It is always started with a statement that hypothesizes “no difference”, called the null hypothesis = H 0. Ø H 0: Mean heightof female student is equal to mean height of male student
Then we formulate a statement that must be true if the null hypothesis is false, called the alternate hypothesis = HA. Ø HA: Mean height of female student is not equal to mean height of male student If we reject H 0 as a result of sample evidence, then we conclude that HA is true.
2. Choose an appropriate statistical test that would allow you to reject H 0 if H 0 were false. E. g. , Student’s t test for hypotheses about means William Sealey Gosset (“Student”)
Mean of sample 1 t Statistic, Mean of sample 2 Standard error of the difference between the sample means To estimate s(X 1 - X 2), we must first know the relation between both populations.
How to evaluate the success of this experimental design class Compare the score of statistics and experimental design of several student ü Compare the score of experimental design of several student from two serial classes ü Compare the score of experimental design of several student from two different classes ü
1. Comparing the score of statistics and experimental design of several student Similar Student Different Student Dependent populations Independent populations Identical Variance Not Identical Variance
2. Comparing the score of experimental design of several student from two serial classes Different Student Independent populations Not Identical Variance
3. Comparing the score of experimental design of several student from two classes Different Student Independent populations Not Identical Variance
Relation between populations Dependent populations n Independent populations n 1. Identical (homogenous ) variance 2. Not identical (heterogeneous) variance
Dependent Populations Sample Test statistic Null hypothesis: The mean difference is equal to o compare Null distribution t with n-1 df *n is the number of pairs How unusual is this test statistic? P < 0. 05 Reject Ho P > 0. 05 Fail to reject Ho
Independent Population with homogenous variances Pooled variance: Then,
Independent Population with homogenous variances
When sample sizes are small, the sampling distribution is described better by the t distribution than by the standard normal (Z) distribution. Shape of t distribution depends on degrees of freedom, = n – 1.
The distribution of a test statistic is divided into an area of acceptance and an area of rejection. For = 0. 05 Area of Rejection 0. 025 Area of Acceptance 0. 95 Area of Rejection 0. 025 0 Lower critical value t Upper critical value
Critical t for a test about equality = t (2),
Independent Population with heterogenous variances
Analysis of Variance (ANOVA)
Independent T-test ü ü Compares the means of one variable for TWO groups of cases. Statistical formula: Meaning: compare ‘standardized’ mean difference ü But this is limited to two groups. What if groups > 2? • Pair wised T Test (previous example) • ANOVA (Analysis of Variance)
From T Test to ANOVA 1. Pairwise T-Test If you compare three or more groups using ttests with the usual 0. 05 level of significance, you would have to compare each pairs (A to B, A to C, B to C), so the chance of getting the wrong result would be: 1 - (0. 95 x 0. 95) = 14. 3% Multiple T-Tests will increase the false alarm.
From T Test to ANOVA 2. Analysis of Variance 2. ü In T-Test, mean difference is used. Similar, in ANOVA test comparing the observed variance among means is used. ü The logic behind ANOVA: • If groups are from the same population, variance among means will be small (Note that the means from the groups are not exactly the same. ) • If groups are from different population, variance among means will be large.
What is ANOVA? ü ü ü Analysis of Variance A procedure designed to determine if the manipulation of one or more independent variables in an experiment has a statistically significant influence on the value of the dependent variable. Assumption: üEach independent variable is categorical (nominal scale). Independent variables are called Factors and their values are called levels. üThe dependent variable is numerical (ratio scale)
What is ANOVA? The basic idea of Anova: The “variance” of the dependent variable given the influence of one or more independent variables {Expected Sum of Squares for a Factor} is checked to see if it is significantly greater than the “variance” of the dependent variable (assuming no influence of the independent variables) {also known as the Mean-Square-Error (MSE)}.
Pair-t-Test Amir Abas Abi Aura 6 8 10 6 Ana 10 Betty Average n Var. sample Pooled Var. Budi Berta Bambang Banu 9 4 7 5 5 8 5 4 = 4 6 5 4 tcalc =1. 581 t-table 2. 306
ANOVA TABLE OF 2 POPULATIONS S V Between populations Within populations SS SSbetween SSWithin DF 1 (n 1 -1)+ (n 2 -1) Mean square (M. S. ) SSB = MSB DFB SSW = MSW DFW S² TOTAL SSTotal n 1 + n 2 -1
ANOVA TABLE OF 2 POPULATIONS S V Between populations Within populations TOTAL SS DF 10 1 32 8 Mean square (M. S. ) 10 4 Fcalc = 2. 50 42 9 Ftable = 5. 318
Rationale for ANOVA • We can break the total variance in a study into meaningful pieces that correspond to treatment effects and error. That’s why we call this Analysis of Variance. The Grand Mean, taken over all observations. The mean of any group. The mean of a specific group (1 in this case). The observation or raw data for the ith subject.
The ANOVA Model Trial i The grand mean A treatment effect Error SS Total = SS Treatment + SS Error
Analysis of Variance ü ü Analysis of Variance (ANOVA) can be used to test for the equality of three or more population means using data obtained from observational or experimental studies. Use the sample results to test the following hypotheses. H 0: 1 = 2 = 3 =. . . = k Ha: Not all population means are equal ü ü If H 0 is rejected, we cannot conclude that all population means are different. Rejecting H 0 means that at least two population means have different values.
Assumptions for Analysis of Variance For each population, the response variable is normally distributed. ü The variance of the response variable, denoted 2, is the same for all of the populations. ü The effect of independent variable is additive ü The observations must be independent. ü
Analysis of Variance: Testing for the Equality of t Population Means ü ü Between-Treatments Estimate of Population Variance Within-Treatments Estimate of Population Variance Comparing the Variance Estimates: The F Test ANOVA Table
Between-Treatments Estimate of Population Variance ü ü ü A between-treatments estimate of σ2 is called the mean square due to treatments (MSTR). The numerator of MSTR is called the sum of squares due to treatments (SSTR). The denominator of MSTR represents the degrees of freedom associated with SSTR.
Within-Treatments Estimate of Population Variance ü ü ü The estimate of 2 based on the variation of the sample observations within each treatment is called the mean square due to error (MSE). The numerator of MSE is called the sum of squares due to error (SSE). The denominator of MSE represents the degrees of freedom associated with SSE.
Comparing the Variance Estimates: The F Test ü ü ü If the null hypothesis is true and the ANOVA assumptions are valid, the sampling distribution of MSTR/MSE is an F distribution with MSTR d. f. equal to k - 1 and MSE d. f. equal to n. T - k. If the means of the k populations are not equal, the value of MSTR/MSE will be inflated because MSTR overestimates σamong 2 Hence, we will reject H 0 if the resulting value of MSTR/MSE appears to be too large to have been selected at random from the appropriate F distribution.
Test for the Equality of k Population Means n Hypotheses H 0: 1 = 2 = 3 =. . . = k Ha: Not all population means are equal n Test Statistic F = MSTR/MSE
Test for the Equality of k Population Means n Rejection Rule Using test statistic: Reject H 0 if F > Fa Using p-value: Reject H 0 if p-value < a where the value of Fa is based on an F distribution with t - 1 numerator degrees of freedom and n. T - t denominator degrees of freedom
Sampling Distribution of MSTR/MSE The figure below shows the rejection region associated with a level of significance equal to where F denotes the critical value. Do Not Reject H 0 F Critical Value MSTR/MSE
ANOVA Table Source of Sum of Degrees of Mean Variation Squares Freedom Squares F Treatment SSTR k- 1 MSTR MSTR/MSE Error SSE n. T - k MSE - Total SST n. T - 1 SST divided by its degrees of freedom n. T - 1 is simply the overall sample variance that would be obtained if we treated the entire n. T observations as one data set.
What does Anova tell us? ANOVA will tell us whether we have sufficient evidence to say that measurements from at least one treatment differ significantly from at least one other. üIt will not tell us which ones differ, or how many differ. ü
ANOVA vs t-test ü ANOVA is like a t-test among multiple data sets simultaneously • t-tests can only be done between two data sets, or between one set and a “true” value ü ü ANOVA uses the F distribution instead of the tdistribution ANOVA assumes that all of the data sets have equal variances • Use caution on close decisions if they don’t
ANOVA – a Hypothesis Test H 0: There is no significant difference among the results provided by treatments. n Ha: At least one of the treatments provides results significantly different from at least one other. n
Linear Model Yij = + j + ij t By definition, j = 0 j=1 The experiment produces (r x t) Yij data values. The analysis produces estimates of t (We can then get estimates of the ij by subtraction).
1 2 3 4 5 6 … t Y 11 Y 12 Y 13 Y 14 Y 15 Y 16 … Y 1 t Y 21 Y 22 Y 23 Y 24 Y 25 Y 26 … Y 2 t Y 31 Y 32 Y 33 Y 34 Y 35 Y 36 … Y 3 t Y 41. . . Yr 1 Y 42. . . Yr 2 Y 43. . . Yr 3 Y 44. . . Yr 4 Y 45. . . Yr 5 Y 46 … … … Y 4 t. . . Yrt . . . Yr 6 ________________________________________ __ __ Y. 1 Y. 2 Y. 3 _ _ Y. 4 Y. 5 Y. 6 … Y • 1, Y • 2, …, are Column Means Y. t
t / Y • • = Y • j t = “GRAND MEAN” j=1 (assuming same # data points in each column) (otherwise, Y • • = mean of all the data)
Yij = + j + ij MODEL: Y • • estimates Y • j - Y • • estimates j (= j – ) (for all j) These estimates are based on Gauss’ (1796) PRINCIPLE OF LEAST SQUARES and on COMMON SENSE
MODEL: Yij = + j + ij If you insert the estimates into the MODEL, < (1) Yij = Y • • + (Y • j - Y • • ) + ij. it follows that our estimate of ij is ij = Yij - Y • j < (2)
Then, Yij = Y • • + (Y • j - Y • • ) + ( Yij - Y • j) { { { or, (Yij - Y • • ) = (Y • j - Y • • ) + (Yij - Y • j ) (3) TOTAL VARIABILITY = in Y Variability in Y + in Y associated with X with all other factors
If you square both sides of (3), and double sum both sides (over i and j), you get, [after some unpleasant algebra, but lots of terms which “cancel”] t r t 2 t r 2 (Yij - Y • • ) = R • (Y • j - Y • • ) + (Yij - Y • j) j=1 i=1 { { { j=1 i=1 2 ( TOTAL SUM OF SQUARES = ( SSBC + SUM OF + ( = SQUARES BETWEEN COLUMNS ( SSW (SSE) ( ( TSS SUM OF SQUARES WITHIN COLUMNS
ANOVA TABLE S V SS DF Among treatment (among columns) SSAc t-1 Within Columns (due to error) SSWc (r - 1) • t TOTAL TSS tr -1 Mean square (M. S. ) SSAC = MSAC t- 1 SSWc (r-1) • t = MSW
Hypothesis, HO : 1 = 2 = • • • c = 0 HI: not all j = 0 Or HO : 1 = 2 = • • c (All column means are equal) HI: not all j are EQUAL
The probability Law of MSBC MSWc = “Fcalc” , is The F - distribution with (t-1, (r-1)t) degrees of freedom Assuming HO true. Table Value
Example: Reed Manufacturing Faculty of Agriculture, GMU would like to know if the teaching quality of xperimental design is similar among classes. A simple random sample of 5 student from 3 classes was taken and the grade of experimental design was collected
Example: Grade of experimental design n Sample Data Observation Advance Broadway Cindy 1 2 3 4 5 Sample Mean 07 Sample Variance 06 08 10 06 10 08 09 04 07 05 05 04 04 10 10 05 06 06 08
Example: Experimental Design n Hypotheses H 0: 1 = 2 = 3 Ha: Not all the means are equal where: 1 = Advance class 2 = Broadway class 3 = Cindy class
Example: Experimental Design Mean Square Due to Treatments = Since the sample sizes are all equal μ= (8 + 6 + 7)/3 = 7 SSTR = 5(8 - 7)2 + 5(6 - 7)2 + 5(7 - 7)2 = 10 MSTR = 10/(3 - 1) = 5 ü ü Mean Square Due to Error SSE = 4(4) + 4(8) = 64 MSE = 64/(15 - 3) = 5. 33
Example: Experimental Design n F - Test If H 0 is true, the ratio MSTR/MSE should be near 1 because both MSTR and MSE are estimating 2. If Ha is true, the ratio should be significantly larger than 1 because MSTR tends to overestimate 2.
Example: Experimental Design n Rejection Rule Using test statistic: Reject H 0 if F > 3. 89 Using p-value : Reject H 0 if p-value <. 05 where F. 05 = 3. 89 is based on an F distribution with 2 numerator degrees of freedom and 12 denominator degrees of freedom
Example: Experimental Design n n Test Statistic F = MSTR/MSE = 5. 00/5. 33 = 0. 938 Conclusion F =0. 938 < F. 05 = 3. 89, so we accept H 0. There is no significant different quality among experimental design classes
n Example: Experimental Design ANOVA Table Source of Sum of Degrees of Mean Variation Squares Freedom Square Fcalc. Among classes 10 2 5. 00 0. 938 Within classes 64 12 5. 33 Total 74 14
Using Excel’s Anova: Single Factor Tool n n n Step 1 Select the Tools pull-down menu Step 2 Choose the Data Analysis option Step 3 Choose Anova: Single Factor from the list of Analysis Tools
Using Excel’s Anova: Single Factor Tool n Step 4 When the Anova: Single Factor dialog box appears: Enter B 1: D 6 in the Input Range box Select Grouped By Columns Select Labels in First Row Enter. 05 in the Alpha box Select Output Range Enter A 8 (your choice) in the Output Range box Click OK
Using Excel’s Anova: Single Factor Tool n Value Worksheet (top portion)
Using Excel’s Anova: Single Factor Tool n Value Worksheet (bottom portion)
Using Excel’s Anova: Single Factor Tool n Using the p-Value üThe value worksheet shows that the p-value is . 00331 üThe rejection rule is “Reject H 0 if p-value <. 05” üThus, we reject H 0 because the p-value =. 00331 < =. 05 üWe conclude that the quality of among experimental design classes is similar
- Slides: 104