Professional Documents
Culture Documents
8.1 Sampling and Estimation
8.1 Sampling and Estimation
Examples of estimators
Example: Consider eight random samples of size n = 5 from a large population of GMAT scores.
𝑋1 = 504. 0 is an estimate
Sampling error
Sampling error: the difference between an estimate and the corresponding population parameter.
Example for population mean
Sampling error = 𝑋 − μ
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
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.
The sample mean is an unbiased estimator for μ: 𝐸(𝑥) = μ (the expected value of mean)
Sampling error of the sample mean - standard error of the mean: described by its standard deviation:
σ
σ𝑋 =
𝑛
The distribution of the sample mean 𝑥 approaches a normal distribution with mean μ and standard
σ
deviation σ𝑋 = as the sample size increases.
𝑛
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 σ𝑋 = as small as you want by increasing n. The mean 𝑋̿ of sample means 𝑋 converges to
𝑛
the true population mean μ as n increases.
Construct a confidence interval for the unknown mean μ by adding and subtracting a margin of error from 𝑋, the mean
of our random sample
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.
Confidence intervals using Student’s t are reliable as long as the population is not badly skewed and if the sample size is
not too small
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.
Standard error σp will decrease as n increases like the standard error for 𝑋. We say that p = x/n is a consistent estimator
of π.
● 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)
Polls and Margin of Error
In polls and survey research, the margin of error is typically based on a 95 percent confidence level and the initial
assumption that π = .50
Each reduction in the margin of error requires a disproportionately larger sample size
Rule of Three
If in n independent trials, no events occur, the upper 95% confidence bound is approximately 3/n
Estimate σ
Method 1: Take a Preliminary Sample
Take a small preliminary sample and use the sample estimate s in place of σ. This method is the most common, though
its logic is somewhat circular (i.e., take a sample to plan a sample).
Method 2: Assume Uniform Population
Estimate upper and lower limits a and b and set σ = [(b - a)2/12 ]1/2 .
𝑧 2
𝑛= ( ) π(1 − π)
𝐸
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 π
2
8.10 CONFIDENCE INTERVAL FOR A POPULATION VARIANCE σ
Chi-Square Distribution
If the population is normal 🡪 construct a confidence interval for the population variance σ2 using the chi-square
distribution with degrees of freedom equal to d.f. = n – 1
Lower-tail and upper-tail percentiles for the chi-square distribution (denoted XL2and XU2) can be found in Appendix E.
2 2
(𝑛−1)𝑠 2 (𝑛−1)𝑠
2 ≤σ ≤ 2
𝑋𝑈 𝑋𝐿
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.
Efforts will be made to reject the null hypothesis (maintained hypothesis or research hypothesis)
● 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
9.3 DECISION RULES AND CRITICAL VALUES
A statistical hypothesis: a statement about the value of a population parameter that we are interested in
Relying on sampling distribution and the standard error of the estimate to decide
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
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 α
9.4 TESTING A MEAN: KNOWN POPULATION VARIANCE
Test Statistic
A test statistic measures the difference between a given sample mean 𝑋 and a benchmark μ0 in terms of the standard
error of the mean.
Critical Value
Reject H0 if zcalc > + zα/2 or if zcalc < - zα/2
p-Value Method
The p-value is a direct measure of the likelihood of the observed sample under H0
● If the p-value is smaller than α, the sample contradicts the null hypothesis 🡪 reject H0
σ σ
Reject H0 if 𝐻0 ∉ ⎡⎢𝑋 + ; 𝑋− ⎤
⎥
⎣ 𝑛 𝑛 ⎦
Using Student’s t
When the population standard deviation σ is unknown and the population may be assumed normal (generally symmetric
with no outliers)
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
The null hypothesis H0: both samples were drawn from populations with the same parameter value
Two samples drawn from the same population 🡪 different estimates of a parameter due to chance.
If the two sample statistics differ by more than the amount attributable to chance 🡪 that the samples came from
populations with different parameter values
Test Procedure
The testing procedure is like that of one-sample tests.
Format of Hypotheses
Test Statistic
The sample statistic used to test the parameter μ1 - μ2 is 𝑋 1 − 𝑋 2. 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α.
Replacing σ12 and σ22 with the sample variances s12 and s22
Common situation of testing for a zero difference (D0 = 0)
If the confidence interval for the difference of two means includes zero
If the same individuals are observed twice but under different circumstances 🡪 paired comparison
If we treat the data as two independent samples, ignoring the dependence between the data pairs, the test is less powerful
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 the sample mean
difference 𝑑 with a hypothesized difference μd (usually μd = 0)
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
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.
To obtain a left-tail critical value FL we reverse the numerator and denominator degrees of freedom
1
𝐹𝐿 = 𝐹𝑑.𝑓 , 𝑑.𝑓
(left-tail critical F with reversed df1 and df2)
2 1
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 + … + nc
Hypotheses to Be Tested
The question of interest is whether the mean of Y varies from treatment to treatment.
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
Test Statistic
The F statistic is the ratio of the variance due to treatments to the variance due to error.
● MSB is the mean square between treatments
● MSE is the mean square within treatments
🡺 MSB to be near zero because the treatment means 𝑦𝑗 would be near the overall mean 𝑦.
when F is near zero 🡪 not expect to reject H0 (hypothesis of equal group means)
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 is a two-tailed test for simultaneous comparison of equality of paired means from c groups
Hartley’s Test
Hartley’s test statistic is the ratio of the largest sample variance to the smallest sample variance:
2
𝑠𝑚𝑎𝑥
𝐻𝑐𝑎𝑙𝑐 = 2
𝑠𝑚𝑖𝑛
● Numerator: df1 = c
𝑛
● Denominator: df2 = 𝑐
− 1
where
Hypotheses to Be Tested
If we are interested only in what happens to the response for the particular levels of the factors:
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
yjk = μ + εjk
● 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
This model is called the full factorial model. In linear model format:
Format of Hypotheses
FACTOR A: ROW EFFECT
● H0: A1 = A2 = . . . = Ar = 0 (row means are the same)
● H1: Not all the Aj are equal to zero (row means differ)
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:
Interaction Effect
● 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
The largest differences in means between clinics or suppliers are about 2 days. Such a small difference might be
unimportant most of the time.
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
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 α.
After calculating tcalc 🡪 Find p-value by using Excel’s function =T.DIST.2T(tcalc,deg_freedom)
First: look up the critical value of t from Appendix D with d.f. = n - 2 degrees of freedom and chosen α
𝑡
𝑟𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 = 2
𝑡 +𝑛−2
A larger sample does not mean that the correlation is stronger nor does its increased significance imply increased
importance.
Only the dependent variable (not the independent variable) is treated as a random variable
🡺 cannot assume that the explanatory variable is “causing” the variation in the response variable
The relationship seen in the scatter plot may not be true for values far outside our observed x range.
Extrapolation outside the observed range of x is always tempting but should be approached with caution.
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:
The difference between the observed value yi and its estimated value 𝑦̌i: a residual - ei
The residual is the vertical distance between each yi and the estimated regression line on a scatter plot of (xi,yi)
values.
Residuals be either positive or negative, and around the regression line always sum to zero
The fitted coefficients b0 and b1 are chosen so that the fitted linear model 𝑦̌ = 𝑏0 + 𝑏1𝑥 has the smallest possible
sum of squared residuals (SSE):
Differential calculus used to obtain the coefficient estimators b0 and b1 that minimize SSE
Sources of Variation in Y
The total variation as a sum of squares (SST), split the SST into two parts:
● SST = total sum of squares
o Measures the variation of the yi values around their mean, y
● SSR = regression sum of squares
o Explained variation attributable to the linear relationship between x and y
● SSE = error sum of squares
o Variation attributable to factors other than the linear relationship between x and y
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
noted that
Division by n – 2 🡪 the simple regression model uses two estimated parameters, b0 and b1
The magnitude of se should always be judged relative to the size of the y values in the sample data
𝑆𝑆𝐸
𝑠𝑒 = 𝑛−2
= 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
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