ECON20003-无代写
时间:2023-03-22
Quantitative Methods 2
ECON 20003
WEEK 2
DESIRABLE PROPERTIES OF POINT ESTIMATORS
PARAMETRIC AND NONPARAMETRIC TECHNIQUES
THE ASSUMPTION OF NORMALITY
References:
S: § 10.1
W: 3.7
Notes prepared by:
Dr László Kónya
DESIRABLE PROPERTIES OF POINT ESTIMATORS
• We consider four properties that can make point estimators easier to
work with and are possessed by ‘good’ point estimators.
Suppose that we are interested in parameter β (it might be e.g. a
population mean, a population proportion or a slope parameter of a
population regression model) and we estimate it with the following
estimator:
a) β -hat is said to be a linear estimator of β if it is a linear function of the
sample observations.
For example, the sample mean X-bar is a linear estimator of the
population mean µ.
However, the sample variance s2 is a quadratic function of the Xi
sample observations, so it is a non-linear estimator of the
population variance σ 2.
UoM, ECON 20003, Week 2 2
b) β -hat is said to be an unbiased estimator of β if
i.e. if the expected value of β -hat is equal to β and thus the sampling
distribution of β -hat is centered around β.
Otherwise, β -hat is referred to as a biased estimator and
Bias
For example, the sample mean is an unbiased estimator of the
population mean because
Similarly, the sample variance is an unbiased estimator of the
population variance because
UoM, ECON 20003, Week 2 3
However, the following alternative estimator of σ 2 is biased since
Suppose that β1-hat and β2-hat denote two different (normally distributed)
estimators of β.
The sampling distribution of β1-hat is
centered around β, while the sampling
distribution of β2-hat is not.
β1-hat is an unbiased, whereas
β2-hat is a biased estimator.
β
β1-hat is expected to estimate β more accurately than β2-hat.
UoM, ECON 20003, Week 2 4
c) β -hat is an efficient estimator of β within some well-defined class of
estimators (e.g. in the class of linear unbiased estimators) if its
variance is smaller, or at least not greater, than that of any other
estimator of β in the same class of estimators.
β3-hat and β4-hat are both unbiased
estimators of β, but the sampling
distribution of β3-hat has a smaller
variance than the sampling distribution
of β4-hat.
β
β3-hat is the more efficient estimator, it is likely to produce a more
accurate estimate of β than β4-hat.
Note: In case of random sampling the sample mean is the best linear unbiased
estimator (BLUE) of the population mean. “Best” means that X-bar has
the smallest variance in the class of linear unbiased estimators of µ,
hence it is an efficient estimator.
UoM, ECON 20003, Week 2 5
d) β -hat is called a consistent estimator of β if its sampling distribution
collapses into a vertical straight line at the point β when the sample
size n goes to infinity.
β
n1 < n2 < n3Let f1(β -hat), f2(β -hat) and f3(β -hat)
denote the sampling distributions of
the same β -hat estimator generated
by three different sample sizes.
These sampling distributions are
centered around β, and as the
sample size increases they become
narrower.
Granted that this is true for larger sample sizes as well, β -hat is a
consistent estimator of β.
If β-hat is an unbiased estimator then consistency requires the
variance of its sampling distribution to go to zero for increasing n.
For example, X-bar is a consistent estimator of µ.
However, if β-hat is a biased estimator then consistency requires both
its variance and the bias to go to zero for increasing n.
UoM, ECON 20003, Week 2 6
PARAMETRIC AND NONPARAMETRIC TECHNIQUES
• Many statistical procedures for interval estimation and hypothesis testing
a) are concerned with population parameters, and
b) are based on certain assumptions about the sampled population
or about the sampling distribution of some point estimator.
These procedures are usually referred to as parametric procedures.
For example, the confidence interval estimation and hypothesis
testing of a population mean based on the t distribution are parametric
procedures as they are concerned with the population mean and
assume that
i. The sample has been randomly selected.
Otherwise it might not represent the population accurately.
ii. The variable of interest is quantitative …
iii. … and is measured on an interval or a ratio scale.
UoM, ECON 20003, Week 2 7
Otherwise the population mean would not exist and the
central location could be measured only with the mode and
the median (if the measurement scale is at least ordinal).
iv. The population standard deviation is unknown, but the population
is normally distributed, at least approximately.
Procedures that are either not concerned with some population
parameter or are based on relatively weaker assumptions than their
parametric counterparts, and hence require less information about the
sampled population, are called nonparametric procedures.
Note: Nonparametric techniques are sometimes referred to as distribution-free
procedures. This is a bit deceptive as they also rely on some, though
fewer and less stringent, assumptions about the sampled population.
Parametric and nonparametric procedures alike can be misleading when
some of their assumptions is violated, so it is crucial to be familiar with
these assumptions and to learn how to check them in practice.
Never run any inferential statistical procedure without
performing a thorough explanatory data analysis first.
UoM, ECON 20003, Week 2 8
THE ASSUMPTION OF NORMALITY
• A crucial assumption behind most parametric procedures is normality,
namely that the underlying sampling distribution is normally distributed.
For example, in the case of testing a population mean with a
parametric test, either σ should be known and the sample mean
should be normally distributed (Z-test),
or if σ is unknown, the sampled population itself should be
normally distributed (t-test), implying that the sample mean is
also normally distributed.
• How can we find out with reasonable certainty whether a population is
normally distributed, at least approximately?
In practice the populations are hardly ever observed entirely. Hence,
we look at the sample data to see if they are more or less normally
distributed, and if they are, then we have ground to believe that the
sampled population is also normal (at least, not extremely non-normal).
Normality can be verified in a number of ways relying on some
(i) graphs, (ii) sample statistics and (iii) formal hypothesis tests.
UoM, ECON 20003, Week 2 9
UoM, ECON 20003, Week 2 10
i. Checking normality visually
We can use two types of graphs to study whether a data set is
characterised by a normal distribution: histogram and QQ-plot.
The QQ (quantile-quantile) plot is a scatter plot that depicts the
cumulative relative frequency distribution of the sample data against
some known cumulative probability distribution.
When it is used for checking normality, the reference distribution is a
(standard) normal distribution and if the sample data is normally
distributed, the points on the scatter plot lie on a straight line.
Ex 1: (Week 1, Ex 2)
Last week we performed a t-test to find out whether there was sufficient
evidence at the 5% level of significance to establish that the average Australian
is more than 10kg overweight.
The sample size was large enough (n = 100) to rely on CLT, so the sampling
distribution of the sample mean could be assumed approximately normal.
However, σ was unknown, so we had to assume that the sampled population
was not extremely non-normal in order to be able to rely on the t-test.
a) Develop an histogram and a QQ-plot of Diff with R to see whether the
sampled population might be normally distributed.
Histogram of diff with a normal curve
that has the same mean and standard
deviation than the sample of diff QQ-plot of diff
The histogram is skewed to the right and on the QQ-plot the points are
scattered around the straight line. Hence, both graphs suggest that diff is
unlikely to be normally distributed.
UoM, ECON 20003, Week 2 11
ii. Quantifying normality with numerical descriptive measures
There are four simple numerical descriptive measures that can help us
decide whether a data set is characterised by a normal distribution:
mean, median, skewness and kurtosis.
For (continuous and unimodal) symmetric distributions, such as the
normal, mean = median (for normal distributions the mode is also equal
to them), …
… while for right (positively) skewed distributions median < mean and
for left (negatively) skewed distributions mean < median.
UoM, ECON 20003, Week 2 12
• Skewness (SK) is a descriptor of the shape of a distribution and it is
concerned with the asymmetry of a distribution around its mean.
The population parameter for SK
is the third standardized moment
defined as:
For symmetric distributions SK = 0, for distributions that are skewed to
the right SK > 0, and for distributions that are skewed to the left SK < 0.
The pastecs package of R
estimates SK with:
The approximate estimated
standard error of this statistic is
The data are likely asymmetric,
thus non-normal (at α = 0.05), when
UoM, ECON 20003, Week 2 13
• Kurtosis (K) is another descriptor of the shape of a (unimodal)
distribution. It is about the tails of a distribution, i.e. about outliers,
relative to the normal distribution.
These curves illustrate three different
allocations of the unit probability of
the certain event over the range of
possible values.
A distribution whose tails are relatively long and thus has more outliers,
is called leptokurtic (leptos is Greek for thin, fine).
A distribution whose tails are relatively short and thus has fewer
outliers, is called platykurtic (platus is Greek for broad, flat).
Note: In terms of parametric vs. nonparametric procedures, the real issue is
whether the distribution is normal or not, the distinction between
leptokurtic and platykurtic is of secondary importance.
UoM, ECON 20003, Week 2 14
The population parameter for K is
the fourth standardized moment
defined as:
K = 3 for normal distributions, K > 3 for leptokurtic distributions, and
K < 3 for platykurtic distributions. K − 3 is called excess kurtosis.
The pastecs package of R
estimates K − 3 with
The approximate estimated
standard error of this statistic is
The data are likely non-normal
(at α = 0.05), when
UoM, ECON 20003, Week 2 15
UoM, ECON 20003, Week 2 16
iii. Testing for normality
There are several statistical tests for normality, i.e. for
H0 : the data comes from a normally distributed population;
HA : the data comes from a non-normally distributed population.
We use only the Shapiro-Wilk (SW) test because it is easy to implement
in R and compares favourably to other tests for normality at the limited
sample sizes we usually have to work with in economics, business and
marketing.
We do not discuss the details of this test as we shall always perform it
with R. The program reports the test statistic and the p-value and H0 is
rejected if the p-value is smaller than the selected significance level.
Note:
a) The t test is fairly robust to departures from normality and hence reliable in
practice, unless the sample size is very small (say, less than 30) and/or the
population is strongly non-normal (e.g. skewed).
UoM, ECON 20003, Week 2 17
b) The SW test, similarly to other tests for normality, has two shortcomings.
(i) At small sample sizes (say, n < 20), when the normality assumption can
be crucial, it has little power to reject H0 even if the population is indeed
not normally distributed (Type II error).
(ii) At large sample sizes (say, n > 100), when the violation of normality is
far less critical in practice, it tends to be too sensitive to the slightest
signs of non-normality in the sample and often rejects H0 even if it is
actually true (Type I error).
For these reasons, it is not recommended to rely entirely on the SW test.
It is always better to assess normality with a combination of graphs, sample
statistics and formal hypothesis tests, though at small sample sizes all these
checks can be unreliable.
(Ex 1)
b) Obtain descriptive statistics and the SW statistic for diff with R and discuss
their implications about normality.
The stat.desc function of the pastecs package generates the following printout:
i. The sample mean (12.175) is bigger than the sample median (10.500),
so the sample of diff is skewed to the right (non-normal).
ii. SK-hat = 0.556 is positive, so the sample of diff is skewed to the right.
SK-hat divided by twice of the standard error is skew.2SE = 1.151 > 1,
so the distribution of diff is unlikely normal.
iii. The estimate of excess kurtosis is K-hat – 3 = -0.548. It is negative, so the
sample of diff is platykurtic. However, the absolute value of K-hat – 3
divided by twice of the standard error is |kurt.2SE | = 0.573 < 1, so the
distribution of diff might be normal.
iv. The reported p-value of the SW test is normtest.p = 0.001 < 0.05, thus
normality is rejected at the 5% level.
Since 3 out of 4 checks cast doubt on normality, the t-test in Ex 2, Week 1
might be misleading.
UoM, ECON 20003, Week 2 18
UoM, ECON 20003, Week 2 19
NONPARAMETRIC TESTS FOR A POPULATION
CENTRAL LOCATION
• For quantitative data the two most useful and popular measures of central location are the
arithmetic mean and the median (in this order).
The mean has two advantages over the median:
 The mean is a comprehensive measure because it is computed from all available data points,
while the median is based on at most two data points.
 The mean is used far more extensively in inferential statistics than the median.
However, occasionally the median also has some advantages:
 Since the median depends only on the middle value(s), it is not affected by outliers
(uncharacteristically small or large values), while the mean can be unduly influenced by
them.
 The median exists even if the measurement scale is just ordinal, but the mean does not.
UoM, ECON 20003, Week 2 20
• A hypothesis about the central location of a quantitative population is
usually best tested with a t test for the population mean (µ).
However, when the mean does not exists, or it is not an ideal measure
of central location due to the presence of outliers, or when the t test is
inappropriate because the normality assumption is clearly violated,
instead of this parametric procedure one should rely on some
nonparametric alternative for testing the central location of a population.
We consider two such alternatives, the sign test for the median and the
Wilcoxon signed rank test for the median, both based on one sample.
(One sample) Sign test for the median (η)
This procedure assumes:
i. The data is a random sample of independent observations.
ii. The variable of interest is qualitative or quantitative.
iii. The measurement scale is at least ordinal.
But, the sign test does not require any assumption about the distribution
of the sampled population.
The hypotheses are vs.
This test is based on the signs of the observed non-zero deviations from
η0, i.e. on the signs of xi -η0 ≠ 0, i = 1, 2, …, n.
Since the true median is right in the middle of an ordered data set, the numbers of negative and
positive deviations (S- and S+) are expected to be about the same if the null hypothesis is correct,
i.e. the population median is indeed η0.
Let S denote the test statistic. In essence, it could be either S- or S+, but we arbitrarily choose S
= S+.
If H0 is true and the selection of the sample items is random, S follows a binomial distribution (see
Review 3) with n and p = 0.5 parameters,
UoM, ECON 20003, Week 2 21
For sufficiently large n (np = nq = 0.5n ≥ 5, so n ≥ 10), this binomial distribution (B) can be
approximated with a normal distribution (N),
Reject H0 if (i) right-tail test: pR = P(S ≥ S+) is small,
(ii) left-tail test: pL = P(S ≤ S+) is small,
(iii) two-tail test: 2×min(pR , pL) is small.
(One sample) Wilcoxon signed ranks test for the median (η),
also known as Wilcoxon signed rank sum test
The sign test is based entirely on the signs of the deviations from η0.
The Wilcoxon signed ranks test is a more sensitive and
potentially more powerful alternative because it takes the
magnitudes of these deviations as well into consideration.
The Wilcoxon signed ranks test assumes that
i. The data is a random sample of independent observations.
UoM, ECON 20003, Week 2 22
ii. The variable of interest is quantitative and continuous.
iii. The measurement scale is interval or ratio.
iv. The distribution of the sampled population is symmetric (µ = η).
The Wilcoxon signed ranks test has the same null and alternative
hypotheses as the sign test, but it is based on the signs and on the
absolute values of the deviations, i.e. |di| = |xi -η0|, i = 1, 2, …, n.
Rank all non-zero |di| from smallest to largest and calculate the
sum of the ranks assigned to negative deviations (T−) and the
sum of the ranks assigned to positive deviations (T+).
The test statistic is T = T+.
When H0 is true, T is right in the middle of
this interval.
The sampling distribution of T is non-standard, but lower and upper
critical values (TL and TU) for 6 ≤ n ≤ 30 are provided in Table 9,
Appendix B of the Selvanathan book (p. 1110).
UoM, ECON 20003, Week 2 23
Using these critical values, reject H0 if
(i) right-tail test: T ≥ TU,α,
(ii) left-tail test: T ≤ TL,α,
(iii) two-tail test: T ≥ TU,α/2 or T ≤ TL ,α/2.
When H0 is true and there are more than 30 non-zero deviations
(i.e. n > 30), the sampling distribution of T can be approximated with a
normal distribution.
Namely,
with
(Ex 1)
c) Perform the sign test and the Wilcoxon signed ranks test at the 5% level of
significance with R.
The original null and alternative hypotheses are H0 : µ = 10 and HA : µ > 10,
but since these nonparametric tests are focusing on the median rather than on
the mean, we rewrite them as H0 : η = 10 and HA : η > 10.
UoM, ECON 20003, Week 2 24
The SignTest function of the DescTools package generates the following printout:
UoM, ECON 20003, Week 2 25
R reports the test statistic (S), the number of non-zero differences, the p-value,
the alternative hypothesis, the 90.3% ‘one-sided’ confidence interval (do not
worry about it) and the sample median.
Check whether R performed the appropriate test (i.e. a right-tail sign test this
time) and whether the p-value < α = 0.05. Since p-value = 0.2692 > 0.05, we
maintain H0 at the 5% significance level.
Hence, at the 5% significance level the sign test does not provide sufficient
evidence in favour of the alternative hypothesis that the average Australian is
more than 10kg overweight.
The wilcox.exact function of the exactRankTests package generates the following printout:
R reports the test statistic (V), the p-value, the alternative hypothesis, the 95%
‘one-sided’ confidence interval (do not worry about it) and a variant of the
sample median.
Since p-value ≈ 0.019 < 0.05, unlike the sign test, the Wilcoxon signed ranks
test rejects H0 at the 5% significance level.
Given these contradicting outcomes, recall that the Wilcoxon test assumes that
the population is symmetrical. This assumption, however, is not supported by
the sample (see the normality checks on slide 18), so we better rely on the
sign test this time.
UoM, ECON 20003, Week 2 26
UoM, ECON 20003, Week 2 27
Note: Similarly to the Wilcoxon signed ranks test, many other nonparametric
tests assume that the underlying variable of interest is continuous.
This assumption is primarily required to exclude the possibility of ties and
it is necessary for exact hypothesis tests.
Still, these procedures are often used in practice even if the variable of
interest is discrete, or is reported on an ordinal scale, but
i. there are a large number of different values,
or
ii. the sample size is large enough to approximate the discrete
sampling distribution of the test statistic with some continuous
probability distribution.
UoM, ECON 20003, Week 2 28
• Desirable statistical properties of point estimators:
linearity, unbiasedness, efficiency and consistency.
• To verify whether a sample might have been drawn from a normally
distributed population using graphs, numerical descriptive measures
and the Shapiro-Wilk test.
• Difference between parametric and nonparametric tests.
• To perform the (one sample) Sign test and Wilcoxon signed ranks test
for the population median manually and with R/RStudio.
WHAT SHOULD YOU KNOW?
FLOW CHART FOR TESTING THE CENTRAL
LOCATION OF A SINGLE POPULATION
Type of data
Quantitative measured on
a ratio or interval scale
Qualitative / categorical
σ
Measurement
scale
Ordinal NominalKnown Estimated
Sign test,
Wilcoxon
signed ranks
test for η
Neither µ
nor η existX-bar ~ N X ~ N
Not
Yes YesNot
Z-test for µ t-test for µ
Note: the data is supposed
to be a random sample of
independent observations
UoM, ECON 20003, Week 2 29
essay、essay代写