Revision SB Chap 8 12 Updated 1
Revision SB Chap 8 12 Updated 1
Revision SB Chap 8 12 Updated 1
An estimator: a statistic derived from a sample to infer the value of a population parameter
An estimate: the value of the estimator in a particular sample tham so tong the
Examples of estimators
Properties of Estimators
BIAS
The bias: the difference between the expected value of the estimator and the true parameter. Example
for the average value
̅)
Bias = 𝑬(𝒙 −𝝁
An unbiased estimator neither overstates nor understates the true parameter on average. Example of
unbiased estimator 𝑬(𝒙
̅) = 𝝁
̅) and sample proportion (p) are unbiased estimators of μ and π
The sample mean (𝒙
EFFICIENCY
Efficiency refers to the variance of the estimator’s sampling distribution
Smaller variance means more efficient estimator. We prefer the minimum variance estimator - MVUE
CONSISTENCY
Consistent estimator converges toward the parameter being estimated as the sample size increases
The variances of three estimators 𝒙
̅, s and p diminish as n increases, so all are consistent estimators.
1. If the population is normal, the sample mean has a normal distribution centered at μ, with a standard
𝝈
error equal to 𝝈𝑿̅ =
√𝒏
2. As sample size n increases, the distribution of sample means converges to the population mean μ
𝝈
(i.e., the standard error of the mean 𝝈𝑿̅ = gets smaller).
√𝒏
3. Even if your population is not normal, by the Central Limit Theorem, if the sample size is large
enough, the sample means will have approximately a normal distribution.
• The distribution of sample means drawn from the population will be normal
• The standard error of the sample mean 𝛔𝐗̅ will decrease as sample size increases
SKEWED POPULATION
The CLT predicts
• The distribution of sample means drawn from any population will approach normality
• The standard error of the sample mean 𝛔𝐗̅ will diminish as sample size increases.
In highly skewed populations, even n ≥ 30 will not ensure normality, though it is not a bad rule
In severely skewed populations, the mean is a poor measure of center to begin with due to outliers
Histograms of the actual means of many samples drawn from this uniform population
We use the familiar z-values for the standard normal distribution. If we know μ and σ, the CLT allows
us to predict the range of sample means for samples of size n:
8.3 SAMPLE SIZE AND STANDARD ERROR
𝝈
The key is the standard error of the mean: 𝝈𝑿̅ = The standard error decreases as n increases
√𝒏
To halve (÷2) the standard error, you must quadruple (x4) the sample size
𝝈
You can make the interval 𝝈𝑿̅ = ̿ of sample
as small as you want by increasing n. The mean 𝑿
√𝒏
̅ converges to the true population mean μ as n increases.
means 𝑿
Construct a confidence interval for the unknown mean μ by adding and subtracting a margin of error
̅ , the mean of our random sample
from 𝑿
The confidence level for this interval is expressed as a percentage such as 90, 95, or 99 percent
Interpretation
If you took 100 random samples from the same population and used exactly this procedure to construct
100 confidence intervals using a 95 percent confidence level
➔ approximately 95 (95%) of the intervals would contain the true mean μ, while approximately 5 (5%)
intervals would not
Student’s t Distribution
When σ is unknown → the formula for a confidence interval resembles the formula for known σ except
that t replaces z and s replaces σ.
The confidence intervals will be wider (other things being the same) - tα/2 is always greater than zα/2.
Degrees of Freedom
Knowing the sample size allows us to calculate a parameter called degrees of freedom - d.f. - used to
determine the value of the t statistic used in the confidence interval formula.
Comparison of z and t
As degrees of freedom increase, the t-values approach the familiar normal z-values.
Using Appendix D
Beyond d.f. 5 50, Appendix D shows d.f. in steps of 5 or 10. If Appendix D does not show the exact degrees
of freedom that you want, use the t-value for the next lower d.f.
• Sample size n
• Confidence level
• Sample proportion p
A narrower interval (i.e., more precision) → increase the sample size or reduce the confidence level
(e.g., from 95 percent to 90 percent)
Rule of Three
If in n independent trials, no events occur, the upper 95% confidence bound is approximately 3/n
Estimate π
Method 1: Assume That π = .50
Method 2: Take a Preliminary Sample
Take a small preliminary sample and insert p into the sample size formula in place of π
Method 3: Use a Prior Sample or Historical Data
(𝒏 − 𝟏)𝒔𝟐 𝟐
(𝒏 − 𝟏)𝒔𝟐
≤ 𝝈 ≤
𝑿𝟐𝑼 𝑿𝟐𝑳
Chapter 9
9.1 LOGIC OF HYPOTHESIS TESTING
The analyst states the assumption, called a hypothesis, in a format that can be tested using well-known
statistical procedures.
Hypothesis testing is an ongoing/iterative/continuous process.
• Rejecting the null hypothesis when it is true is a Type I error (a false positive).
• Failure to reject the null hypothesis when it is false is a Type II error (a false negative).
The power of a test is the probability that a false hypothesis will be rejected. Reducing β would
correspondingly increase power (e.g. increase the sample size)
Both α and β can be reduced simultaneously only by increasing the sample size
The direction of the test is indicated by which way the inequality symbol points in H1:
Decision Rule
Compare a sample statistic to the hypothesized value of the population parameter stated in the null
hypothesis
• Extreme outcomes occurring in the left tail → reject the null hypothesis in a left-tailed test
• Extreme outcomes occurring in the right tail → reject the null hypothesis in a right-tailed test
The area under the sampling distribution curve that defines an extreme outcome: the rejection region
Calculating a test statistic that measures the difference between the sample statistic and the
hypothesized parameter
➔ A test statistic that falls in the shaded region → rejection of H0
Critical Value
The critical value: the boundary between the two regions (reject H0, do not reject H0).
The decision rule states what the critical value of the test statistic would have to be in order to reject
H0 at the chosen level of significance (α).
The choice of α should precede the calculation of the test statistic, thereby minimizing the temptation to select α
p-Value Method
The p-value is a direct measure of the likelihood of the observed sample under H0
Compare the p-value with the level of significance.
• If the p-value is smaller than α, the sample contradicts the null hypothesis → reject H0
Two-Tailed Test
Reject H0 if zcalc > + zα/2 or if zcalc < - zα/2
Otherwise do not reject H0
USING THE P-VALUE APPROACH
In a two-tailed test, the decision rule using the p-value is the same as in a one-tailed test
Reject H0 if 𝑯𝟎 ̅+ 𝝈 ; 𝑿
∉ [𝑿 ̅ − 𝝈]
√𝒏 √𝒏
Using Student’s t
When the population standard deviation σ is unknown and the population may be assumed normal
(generally symmetric with no outliers)
SENSITIVITY TO α
Decision is affected by our choice of α. Example:
Two-Tailed Test
CALCULATING A P-VALUE FOR A TWO-TAILED TEST
In two-tailed test, p-value = 2 x P(Z > zcalc)
Reject H0 if 2 x P(Z > zcalc) < α
Otherwise fail to reject H0
Effect of α
The test statistic zcalc is the same regardless of our choice of α, however, our choice of α does affect the
decision.
Which level of significance is the “right” one depends on how much Type I error we are willing to allow.
Smaller Type I error leads to increased Type II error
Chapter 10
10.1 TWO-SAMPLE TESTS
• A one-sample test compares a sample estimate against a non-sample benchmark
• A Two-sample test compares two sample estimates with each other
Format of Hypotheses
Test Statistic
̅ 𝟏−𝑿
The sample statistic used to test the parameter μ1 - μ2 is 𝑿 ̅ 𝟐 . The test statistic will follow the same
general format as the z- and t-scores in chapter 9
Knowing the values of the population variances, σ12 and σ22, the test statistic: z-score
➔ Use the standard normal distribution to find p-values or critical values of zα.
By assuming that the population variances are equal → pool the sample variances by taking a weighted
average of s12 and s22 → calculate an estimate of the common population variance aka pooled
variance - denoted sp2
CASE 3: UNKNOWN VARIANCES ASSUMED UNEQUAL
Replacing σ12 and σ22 with the sample variances s12 and s22
Common situation of testing for a zero difference (D0 = 0)
Paired t Test
In the paired t Test we define a new variable d = X1 - X2 as the difference between X1 and X2.
The two samples are reduced to one sample of n differences d1, d2, . . . , dn. Presenting the n observed
differences in column form:
or row form:
We calculate the mean 𝒅̅ and standard deviation sd of the sample of n differences d1, d2, . . . , dn with the
usual formulas for a mean and standard deviation.
The population variance of d is unknown → a paired t test using Student’s t with d.f. = n - 1 to compare
̅ with a hypothesized difference μd (usually μd = 0)
the sample mean difference 𝒅
Pooled Proportion
If H0 is true → no difference between π1 and π2
➔ samples be pooled into one “big” sample → estimate the combined population proportion pc
Test Statistic
Testing for zero difference
The rule of thumb for assuming normality is that np ≥ 10 and n(1 - p) ≥ 10 for each sample
10.7 COMPARING TWO VARIANCES
Format of Hypotheses
An equivalent way to state these hypotheses is to look at the ratio of the two variances
The F Test
The test statistic is the ratio of the sample variances. Assuming the populations are normal, the test statistic
follows the F distribution
If the null hypothesis of equal variances is true, this ratio should be near 1:
Two-Tailed F Test
Critical values for the F test are denoted FL (left tail) and FR (right tail)
A right-tail critical value FR: found from Appendix F using d.f1. and d.f2.
FR = Fdf1, df2 (right-tail critical F)
To obtain a left-tail critical value FL we reverse the numerator and denominator degrees of freedom
𝟏
𝑭𝑳 = (left-tail critical F with reversed df1 and df2)
𝑭𝒅.𝒇𝟐,𝒅.𝒇𝟏
CHAPTER 11
11.1 OVERVIEW OF ANOVA
Analysis of Variance (ANOVA) allows one to compare more than two means simultaneously.
Variation in Y about its mean is explained by one or more categorical independent variables (the
factors) or is unexplained (random error).
N-FACTOR ANOVA
ANOVA Assumptions
Analysis of variance assumes that
• H0: µ1 = µ2 = µ3 =…= µc
• H1: Not all the means are equal
If we cannot reject H0, we conclude that observations within each treatment have the same mean µ.
n = n1 + n2 + … + n c
Hypotheses to Be Tested
The question of interest is whether the mean of Y varies from treatment to treatment.
o H0: μ1 = μ2 = . . . = μc (all the treatment means are equal)
o H1: Not all the means are equal (at least one pair of treatment means differs)
Random error is assumed to be normally distributed with zero mean and the same variance.
If interested only in what happen to the response for the particular levels of the factor (a fixed-effects
model)
If the null hypothesis is true (Tj = 0 for all j) the ANOVA model is:
If the null hypothesis is false, in that case the Tj that are negative (below μ) must be offset by the Tj that are
positive (above μ) when weighted by sample size.
Decomposition of Variation
Group Means
The mean of each group is calculated in the usual way by summing the observations in the treatment and
dividing by the sample size
̅ can be calculated by
The overall sample mean or grand mean 𝒚
Decision Rule
Use Appendix F to obtain the right-tail critical value of F - denoted Fdf1,df2 or Fc-1,n-c
e.g.: μ1 = μ2 ≠ μ3
Tukey’s studentized range test is a multiple comparison test
Tukey’s is a two-tailed test for simultaneous comparison of equality of paired means from c groups
The hypotheses to compare group j with group k:
Hartley’s Test
Hartley’s test statistic is the ratio of the largest sample variance to the smallest sample variance:
𝒔𝟐𝒎𝒂𝒙
𝑯𝒄𝒂𝒍𝒄 = 𝟐
𝒔𝒎𝒊𝒏
o Do not reject if Hcalc ≈ 1 the variances are the same
o Reject H0 if Hcalc > Hcritical
Critical values of Hcritical may be found in Harley’s critical value table using degrees of freedom:
• Numerator: df1 = c
𝒏
• Denominator: df2 = − 𝟏
𝒄
where
FACTOR A
• H0: A1 = A2 =. . . = Ar = 0 (row means are the same)
• H1: Not all the Aj are equal to zero (row means differ)
FACTOR B
• H0: B1 = B2 =. . . = BC = 0 (column means are the same)
• H1: Not all the BK are equal to zero (column means differ)
If we are unable to reject either null hypothesis
➔ all variation in Y: a random disturbance around the mean μ:
yjk = μ + εjk
Randomized Block Model
When only one factor is of research interest and the other factor is merely used to control for potential
confounding/perplexing/staggering influences
In the randomized block model
• the column effects: treatments (as in one-factor ANOVA → the effect of interest)
• the row effects: blocks
A randomized block model looks like a two-factor ANOVA and is computed exactly like a two-factor ANOVA
Interpretation may resemble a one-f actor ANOVA since only the column effects (treatments) are of interest
Format of Calculation of Nonreplicated Two-Factor ANOVA
INTERACTION EFFECT
• H0: All the ABjk = 0 (there is no interaction effect)
• H1: Not all ABjk = 0 (there is an interaction effect)
Format of Data
Data Format of Replicated Two-Factor ANOVA
Sources of Variation
The total sum of squares is partitioned into four components:
• In the absence of an interaction, the lines will be roughly parallel or will tend to move in the same
direction at the same time.
• A strong interaction, the lines will have differing slopes and will tend to cross one another
• Significant differences at α = .05 between clinics C, D and between suppliers (1, 4) and (3, 5).
• At α = .01 there is also a significant difference in means between one pair of suppliers (4, 5).
Significance versus Importance
MegaStat’s table of means (Figure 11.23) allows us to explore these differences further and to assess the
question of importance as well as significance.
The largest differences in means between clinics or suppliers are about 2 days. Such a small difference
might be unimportant most of the time.
However, if their inventory is low, a 2-day difference could be important
Chapter 12
12.1 VISUAL DISPLAYS AND CORRELATION ANALYSIS
Visual Displays
Analysis of bivariate data (i.e., two variables) typically begins with a scatter plot that displays each
observed data pair (xi, yi) as a dot on an X-Y grid.
➔ initial idea of the relationship between two random variables.
Correlation Coefficient
Sample correlation coefficient (Pearson correlation coefficient) - denoted r - measures the degree of
linearity in the relationship between two random variables X and Y.
• Negative correlation:
o xi is above its mean
o yi is below its mean
• Positive correlation: xi and yi are above/below their means at the same time
Three terms called sums of squares
√𝑺𝑺𝒙𝒚
𝒓=
√𝑺𝑺𝒙𝒙 √𝑺𝑺𝒚𝒚
Correlation coefficient only measures the degree of linear relationship between X and Y
Tests for Significant Correlation Using Student’s t
The sample correlation coefficient r is an estimate of the population correlation coefficient ρ
Compare this t test statistic with a critical value of t for a one-tailed or two-tailed test from Appendix D
using d.f. = n - 2 and any desired α.
First: look up the critical value of t from Appendix D with d.f. = n - 2 degrees of freedom and chosen α
𝒕
𝒓𝒄𝒓𝒊𝒕𝒊𝒄𝒂𝒍 =
√𝒕𝟐 + 𝒏 − 𝟐
• a benchmark for the correlation coefficient
• no p-value
• inflexible when changing α
In very large samples, even very small correlations could be “significant”
A larger sample does not mean that the correlation is stronger nor does its increased significance imply
increased importance.
12.2 SIMPLE REGRESSION
What Is Simple Regression?
The simple linear model in slope-intercept form: Y = slope × X + y-intercept. In statistics this straight-line
model is referred as a simple regression equation.
Inclusion of a random error ε is necessary because other unspecified variables also may affect Y
The regression model without the error term represents the expected value of Y for a given x value
called simple regression equation
• Assumption 1: The errors are normally distributed with mean 0 and standard deviation σ.
• Assumption 2: The errors have constant variance, σ2.
• Assumption 3: The errors are independent of each other.
The regression equation used to predict the expected value of Y for a given value of X:
̌i: a residual - ei
The difference between the observed value yi and its estimated value 𝒚
The residual is the vertical distance between each yi and the estimated regression line on a scatter
plot of (xi,yi) values.
̌
The fitted coefficients b0 and b1 are chosen so that the fitted linear model 𝒚 = 𝒃𝟎 + 𝒃𝟏 𝒙 has the
smallest possible sum of squared residuals (SSE):
Differential calculus used to obtain the coefficient estimators b0 and b1 that minimize SSE
The OLS formula for the slope can also be:
Sources of Variation in Y
The total variation as a sum of squares (SST), split the SST into two parts:
Coefficient of Determination
The coefficient of determination: the portion of the total variation in the dependent variable that is
explained by variation in the independent variable
SSR SSE
R2 = = 1−
SST SST noted that 0 R2 1
Examples of Approximate R2 Values: The range of the coefficient of determination is 0 ≤ R2 ≤ 1.
e 2
i
SSE
σˆ 2 = s2e = i=1
=
n−2 n−2
Division by n – 2 → the simple regression model uses two estimated parameters, b0 and b1
se = s2e
the standard error of the estimate
The magnitude of se should always be judged relative to the size of the y values in the sample data
INFERENCES ABOUT THE REGRESSION MODEL
The variance of the regression slope coefficient (b1) is estimated by
s2e s2e
sb =
2
=
1
(xi − x) (n − 1)s2x
2
where:
𝑺𝑺𝑬
𝒔𝒆 = √𝒏−𝟐 = Standard error of the estimate
These standard errors → construct confidence intervals for the true slope and intercept
using Student’s t with d.f. = n - 2 degrees of freedom and any desired confidence level.
Hypothesis Tests
if β1 = 0 ➔ X does not influence Y
→ the regression model collapses to a constant β0 + a random error term:
For either coefficient, we use a t test with d.f. = n - 2. The hypotheses and test statistics
SLOPE VERSUS CORRELATION
The test for zero slope is the same as the test for zero correlation.
➔ The t test for zero slope will always yield exactly the same tcalc as the t test for zero correlation