Homework
HW #6 (and Bonus HW)
- Due date: May 12 (firm due date --- no lengthy grace period ... I might start
grading the papers about 15 minutes after the start of the exam period)
- HW #6 was distributed (in hard copy format) in class.
- Here is the
Bonus HW assignment, and here is the
data for the Bonus problems.
(You'll have to enter the HW #6 data on your own.)
- If you need to give a statement about the p-value based on a test
statistic that has the studentized range distribution with 3 and
infinity df as its approximate null sampling distribution,
then be sure to use
these critical values
in order to make a more precise statement about the p-value than you
could do if you only used the critical values in the hard copy tables
that I distributed.
- For Problem 3, assume that after each of the 12 subjects was on the assigned diet for a fixed period of time,
their cholesterol level was measured twice in a short period of time (since two measurements are better than one,
especially considering that measured cholesterol level can vary greatly for an individual). Do not take the two
values to be before and after measurements.
- PLEASE put your answers in the answer boxes on the answer sheet supplied with HW #6. Also, on the night
of the exam, I want you to turn in your papers by making four separate stacks: one for the answer sheets, one for
each of the two reports, and one for the Bonus HW problem solutions --- so don't staple everything together.
I want you to turn in your papers prior to
starting the exam.
HW #5
- Due date: April 21
- Even though I indicate these things elsewhere, since I anticipate that some of you will have rather long solutions,
it is important that you make them easy to grade by presenting well-organized work, perhaps highlighting key statements in your solutions,
and making sure that the material is presented in the proper order. (So (a) before (b), and if a plot is not used prior to part (b)
or part (c), please put the plot in that part and not have it far away from where it is used. (If a plot is used for more than one
part, don't put it in your solutions more than once --- put it in the part where it is first used.)) Staple all of your sheets
together. (If you can't staple them, or you have so many sheets that they cannot be easily turned, then your solutions are too long.)
Don't clip your sheets together with a paper clip or binder clip, or put them in a folder.
- Read all instructions carefully and follow them! (E.g., do the nonparametric tests exactly as I prescribe.)
Pay attention to what is being requested in each part! Some parts may request an inference be made about the means, and
other parts may request inferences for medians or other quantiles. For some parts the focus may be on whether there is evidence that
the distributions differ in any way (the general two sample problem). For two independent samples, looking for evidence of a
treatment effect is looking for evidence of nonidentical distributions.
- Here is a
.pdf version of the assignment (except
for the data sets and descriptions of data sets).
- Here is the
data for HW #5 (and also the data for HW #5 from Fall 2004).
(If, for whatever reason, you would prefer to be e-mailed the data, just send me a request. But please try to
determine if you can get what you need from the link.)
- Here is a
.pdf version of the Fall 2004 assignment (except
for the data sets and descriptions of data sets).
Here are the
correct answers for HW #5 from Fall 2004.
*** These posted answers are not in the format that your solutions should be in.
I created the answers web page to go along with the plots that most students generated
correctly, and so I did not include any. Also, in some cases, I list results from methods which need not have been considered.
This was to aid me in grading the papers. As with HW #4, your mission is to convince me that you understand the material. This can
best be done by giving a clear assessment of each situation, explaining your choice of procedures, and correctly implementing the
chosen procedure. ***
- Here are some facts pertaining to the two-sample procedures that I
covered in class. (I've mentioned these in class, but some students may
still be confused.) For all of what I have below, it is assumed that one
has two independent sets of iid random variables, from possibly
different distributions.
- Although many books and software packages characterize the W-M-W
test and some other two-sample nonparametric tests as being tests about
the distribution medians, that characterization is typically based on the often
unjustified assumption that the distributions follow a shift model.
(I very seldom encounter data for which a shift model seems
appropriate.) If one has a shift model, then the difference in
distribution means is the same as the difference in distribution
medians. In a shift model setting, perhaps some favor referring to
medians as opposed to means because some distributions don't have means,
but have medians. (However, I think it would be odd to have data from a
distribution for which the mean does not exist, since if a distribution
has compact support (i.e., the range of values that the random variable
takes on is bounded), the mean will exist and be finite. (Note:
Some books have that an expected value can be infinite, while other
books stipulate that an expected value must be finite (and some books
have it both ways).)) The Hodges-Lehmann point estimate for the shift
parameter (difference in means / difference in medians for a pair of
distributions following a shift model), and the confidence interval
associated with the W-M-W test, should only be used if one believes that
a shift model is appropriate. These estimates can be very
inaccurate if one isn't dealing with a shift model
situation.
At this point you may be wondering (hopefully not, since it means you
didn't understand what I have been stressing in the recent lectures)
when two-sample nonparametric methods can be used other than in rare
shift model situations. Well, they are always valid for the general
two-sample problem of testing the null hypothesis of identical
distributions against the general alternative that the distributions
differ in some way. Also, they can be used as tests about the means if
one can believe that either the two distributions are identical, or that
one distribution is stochastically larger than the other distribution if
the distributions differ. Since one can treat the nonparametric tests
as tests about the medians or tests about the means if a shift model or
a scale model is
assumed (if we overlook the odd cases for which the distibutions means are
infinite), the class of situations the tests can be viewed as tests
about medians is a proper subset of the class of situations for which
the tests can be viewed as tests about the means.
Because of this, even the two-sample median test (Fisher's exact test
and it's approximate version(s)) is better viewed as a test about means
than medians. But it's better to think of it as a test of the general
two-sample problem that "is sensitive" (can have decent power to reject
the null hypothesis) to particular alternatives for which the
distribution medians differ, and to note that the test can sometimes be
used to do a test about the distribution means. It's too bad that so
many books have misleading information about the two-sample
nonparametric tests. (It's too bad that so many books have misleading
information about a lot of other techniques of applied statistics.
Even books by statisticians who are generally highly regarded contain
lots of errors (and not just typos --- I'm referring to errors that
indicate a lack of understanding).)
- Student's two-sample t test can often be a reasonably
accurate test of the general two-sample problem. It's perfectly valid
if the common distribution (if the null hypothesis is true) is assumed
to be normal, but if the sample sizes are equal and not too small it's
robust enough to handle nonnormal distributions due to the fact that if
the null hypothesis is true then the distributions are identical and the
sampling distributions of the sample means are identical, and the
sampling distribution of the difference in sample means is symmetric
about 0. This sampling distribution need
not be normal, and the null sampling distribution of Student's t
statistic need not be a T distribution if the parent
distributions of the data aren't normal, but any appreciable
nonnormality would tend to make the test conservative, and in such a
case it can
be viewed as being valid. (One need only worry about very small samples
from light-tailed distributions (including some skewed distributions
which don't have a particularly heavy tail) in the equal sample size case.) For
unequal sample sizes, one can often rely on the test to be reasonable if
the sample sizes are somewhat large so that both sample means are
approximately normal.
- I don't advocate the use of Welch's test for the general two-sample
problem. If we always try both Welch's test and Student's two-sample
test, and take the smaller of the two p-values, then we'd have an
inflated type I error rate. Since the distribution variances are equal
if the null hypothesis of identical distributions is true, I think
Student's test is the more appropriate one, and will be the more
powerful one in the equal sample size case.
- If you want to do a test about the means and you are not dealing
with normal distributions, and it cannot be assumed that one
distribution is stochastically larger than the other if the
distributions differ, then of the methods that I've presented in class,
Welch's test is typically the best choice (unless there is reason to
believe that the variances are equal). If the distributions don't
appear to have similar shapes and the sample sizes are small, one may
not feel too comfortable with using Welch's test. In such cases, I'd
perhaps give the benefit of the doubt to an assumption that one
distribution must be stochastically larger than the other if the
distributions differ, if such an assumption is plausible --- but if it seems like a bad assumption, then
one just needs to rely on the robustness of Welch's test, and note that
the resulting p-value is highly suspect. It's important to note that in cases for which
the nonparametric tests appear to be valid as tests about the means of
nonnormal distributions, then one should not rely on the
robustness of procedures based on an assumption of normality in small
sample size situations for which the reliance on robustness is highly
questionable. For confidence intervals, one may have to rely more on
the robustness of Welch's method, because for interval estimation some
of the alternative nonparametric and robust methods (e.g., methods based
on the difference in trimmed means) can be way off if one isn't dealing
with a shift model or a pair of symmetric distributions. (The
nonparametric confidence interval methods require a shift model and can
do poorly if the siutuation differs enough from a shift model, the
interval based on trimmed means and assumed homoscedasticity is valid if
one has equal sample sizes and a shift model, or if one has equal
variances and a pair of symmetric distributions, and the interval based
on trimmed means and assumed heteroscadesticity requires a pair of
symmtric distributions. Slight asymmetry may be tolerated, but
the methods become more approximate in nature than they already are.)
- You should use a variety of methods to address the various parts of
the assignment, although you may not use all of the procedures covered
in class, and you may need to use one or more of the methods more than
once.
- Here are the
correct answers for HW #5
(which I posted here only after I finished grading the papers).
HW #4
- Due date: April 7
- Here is a
.pdf version of the assignment. I'll
assume that everyone can access it unless I hear otherwise.
Here is
a version of the data
that may be convenient for some. I can also e-mail you the data if you send me an e-mail request.
Here are
guidelines pertaining to Unit 1
procedures. In class, I will distribute hard copies of the data sets.
- Please follow these rules regarding HW #4 solution submissions.
- Use paper which is approximately 8.5 inches by 11 inches.
- Staple sheets together --- don't use paper clips, binders, etc. ... when grading the papers it's easiest if people just staple their sheets together.
- Don't attach a cover sheet and don't give an executive summary with just the answers separated from your other work and justifications. Instead, give each answer along with the supporting work. Clearly indicate your final answer for each part by highlighting it or drawing a box around it. Also, don't give all of your computer work in an appendix --- have the pertinent computer work for a part given with your final answer and justification.
Put your name in the upper right hand corner of the first page.
- Put your solutions in order. (E.g., the solution for 1(a) should come before the solution for 1(b). The solution for 2 should come before the solution for 3.)
- If you choose to submit the extra credit problem, do not attach it to the
rest of your homework submission --- rather hand it in separately.
- Here is a
.pdf version of HW #4 from Fall 2003. (I can e-mail you the data for both
your current assignment and the Fall 2003 HW #4 --- I have all of the data in one file, so just request the HW #4 data and you'll get
it all. But the data for this assignment is also in the data web page linked to above --- it follows the data for this semester's
assignment.) Here are the
answers for HW #4 from Fall 2003. I don't want your solutions to be in the same format!
Rather, in your solutions, for each part you should determine what you're dealing with using plots and perhaps estimates, and then
justify the choice of the best procedure to use. (It's not important to give the results from the procedures that you don't select,
but you should definitely indicate all of the valid procedures that you considered.) While it's okay to mimic some of the arguments I
present, if they are valid for your HW problems, you will be heavily penalized for using my words in situations where they cannot be
sensibly used. You should have a good understanding of everything that you write down!
I've long felt that it's a shame that there wasn't time to let students do another assignment similar to HW #4 after they got back
their graded HW #4 papers. By making good use of the old HW #4 assignment and the supplied answers while you're working on your HW #4
solutions, you should be able to do a really good job on HW #4. On the whole, I guess you'll learn more this way, if you work hard
and responsibly, as opposed to spending a lot of time working on problems without having a decent understanding of how to make the
proper justifications. Plus, if you check your p-values and estimates against mine, you might uncover a flaw in your way of doing
something.
- Please read the instructions carefully. In particular, respect the
page limit for the length of your solutions, and be sure to justify
your choice of procedure for each part. (It's not adequate
justification to write something vague like "per the guidelines supplied with HW #4" or "per
the course notes" or "based on what you said in lecture." But it is okay to refer to a specific statement, fact, table, or result from the
course materials to justify a certain choice.) Although it isn't necessary to give the result from every valid procedure
that you considered (it's okay to just give the result from the procedure you chose), generally you should indicate which procedures
you considered for each part. (For some parts, there is only one procedure that should be given serious consideration. In such cases
you should indicate why this is so --- why is one procedure the clear-cut best choice and/or why should all other procedures be
eliminated? (It's not necessary to write a lot for justification --- just write something to let me know that you understand why the
choice you made is the correct one.))
-
Here are some comments about students' HW #4 solutions from a previous
semester --- they got these comments after I graded their papers, but
it may be
good for you to read them
over before you submit your solutions to HW #4.
- If you don't justify your choice of inference procedure, then there
isn't good evidence (against my null hypothesis) that you just happened
to randomly pick the correct choice, or that you used it because it was
easy to do, or that you selected it for the wrong reasons. I'm a
believer in the adage that sometimes even a blind squirrel finds an acorn,
and I know that students can give the right answer without
understanding why it is correct. (Some students give wonderful
justifications of why they used what I think is the best procedure.
Other students in a sense hang themselves because they give a completely
ridiculous justification even though they somehow managed to select the
right procedure. I'm not going to penalize those students, who at least
followed the instructions and offered some justification, more than I am
students who offer no justification at all.)
Also, simply stating that you followed guidelines presented
in class doesn't supply evidence of understanding and mastery
of the material. You should state the facts that led to your choice,
and also indicate how you arrived at those facts. For example, a clear
indication of skewness may have led to your choice of Johnson's modified
t test for a test about a distribution mean, and you may have determined that you are dealing with a
skewed distribution by an examination of both a probit plot and a
symmetry plot, and also have been supplied supporting evidence by
computing the value of the sample skewness. (Giving at least one of the
plots would be good --- at the end of the semester you'll perhaps do
better (e.g., if your computed score puts you on the borderline between
the A- and the B+ groups) if you have been able to convince me that you
are comfortable with the methods and thoroughly understand a lot of what
I've tried to teach. (While I compute the overall course scores
according to the prescription indicated at the start of the semester, I
do let my impressions of how well you truly understand the material
guide my decisions of where to make the cuts between the various grade
groups.))
- Noting that a method is valid doesn't justify its choice unless it
is also noted that all of the other methods aren't valid. In some cases
there can be more than one valid method, and in such cases you should
explain why you chose the method that you used to supply your final
p-value or estimate. (If you indicate that the picked the smallest valid p-value or shortest valid confidence interval, then you
should state which other procedures you considered (but you do not have to give the results from all of the other procedures).)
- If you want me to look at plots, place them in your solutions at an
appropriate place, and don't attach the plots as appendix material. In
general, the plot should precede the p-value or estimate. If a plot
is used to justify the choice of method for more than one part of a
problem, the plot should appear prior to the final answer for the first
part where in which the plot is referred to.
Don't give plots that have a break in them --- a plot should not be on two different pages and a plot should
not be distorted in any way.
- When using an approximate procedure like Johnson's modified t
test, or even the ordinary t test when the data came from a
nonnormal distribution, at times it may be more appropriate to report
the p-value using only one significant digit instead of two (and never
should one give more than two significant digits for an approximate
p-value since doing so gives an indication of a high degree of accuracy
that simply isn't warrented). One significant digit may be preferred if
the sample size is less than 10 or 15, or if the p-value appears to be
rather small (e.g., less than 0.01), or when it makes little difference
(e.g., when using two digits results in 0.038 or 0.042 one may choose to
report 0.04 if a smallish
sample size makes the second significant digit highly suspect). But
otherwise, it's best to go with two significant digits, even in cases
where one isn't sure that the second digit is absolutely correct. For
example, I wouldn't round everything in the interval (0.0151, 0.0249) to
0.02 unless I had a really small sample size (say less than 12), but I
would generally round everything in the interval (0.00651, 0.00749) to
0.007.
- Don't put that you did a test to estimate a distribution measure.
For example, if you use Student's t statistic to produce a
confidence interval, you shouldn't state that you estimated the mean
using a t test. Some students put that they used a test to give
a point estimate. While there are relationships between some estimates and
some tests, and with some software you can obtain an estimate by running
a test, don't put that used used a certain test to estimate the mean
or median --- rather give the estimator which was used.
- It's harder to interpret the kurtosis value as being a measure of
tail weight when there is appreciable skewness. When the skewness is
small, the kurtosis more clearly relates to tail weight and is more easily
interpretted than in cases where the skewness is large (since when the
skewness is large the kurtosis is often not close to 0 --- but in such
cases it's often sufficient just to note the appreciable skewness).
- I didn't supply a formula for the modification of the E1 quantile
estimator that is sometimes appropriate for quantiles in the lower tail.
You are expected to be able to figure out what to do --- the goal is to
make the estimators for the lower-tail quantiles consistent with the
estimators that work well for the upper-tail quantiles. For example, if
a good estimator for the 90th percentile of a positively skewed distribution is
0.3X(n-3) +
0.7X(n-2)
(which is a linear combination of the 2nd and 3rd to the largest
(or 3rd and 4th largest) order
statistics), the estimator for the 10th percentile of a negatively skewed distribution
(when the skewness is of the same magnitude, and the sample size is the same) should be
0.7X(3) +
0.3X(4)
(which is a linear combination of the 2nd and 3rd to the smallest
(or 3rd and 4th smallest) order
statistics).
For a specific example, suppose n = 23. To estimate the 90th percentile of a positively skewed distribution
with E1, one uses
0.3X(20) +
0.7X(21) --- giving a weight of 0.7 to the 3rd largest observation and a weight of 0.3 to the 4th
largest observation. If this works well for the 90th percentile of a positively skewed distribution, it makes
sense that to estimate the 10th percentile of a negatively skewed distribution one should use
0.7X(3) +
0.3X(4) --- giving a weight of 0.7 to the 3rd smallest observation and a weight of 0.3 to the 4th
smallest observation.
- Here are the
correct answers for HW #4
(which I posted here only after I finished grading the papers).
HW #3
-
The nominal due date is March 24.
- Here is a
.pdf version of the assignment.
In class I will distribute a hard copy answer sheet,
which will also show the data sets.
Here is
a version of the data
that may be convenient for some. I can also e-mail you the data if you send me an e-mail
request for the data sets (but only the hard copy sheet which shows the data sets
has the descriptions of the nature of the data sets).
- It should be noted that for some smallish samples),
Q-Q plots based on the normal distribution and some heavy-tailed mound-shaped symmetric distributions (like
the logistic distribution) can look very similar, indicating that the data is "in agreement with"
both normal and nonnormal distributions. This is due to the fact that for some heavy-tailed symmetric distributions,
the relative distribution of the middle 90% or so of the probability mass is not too different than it is for normal
distributions, with the appreciable differences in the distribution of the probability mass being in the more extreme tails,
which results in Q-Q plots based on small samples looking very similar for both normal and some heavy-tailed symmetric distributions,
because with a small sample, none, or very few, of the observations will correspond to the more extreme tail regions. (If one has larger
samples, then the plots will look more different.)
- To easily get symmetry plots using some versions of Minitab for Windows, use Stat > Quality Tools > Symmetry Plot.
(It seems like not all versions of Minitab has this feature.)
- Recall that instead of plot c1 c2 it has to be plot c1*c2 in the Windows version of Minitab.
- Here are the
correct answers for HW #3
(which I posted here only after I finished grading the papers).
HW #2
-
The nominal due date is March 3.
- Here is a
.pdf version of the assignment. I'll
assume that everyone can access it unless I hear otherwise.
Here is the
answer sheet for HW #2. You
are to print this out and put your answers on the answer sheet.
Here is the
computer failure data for Problem 5.
Here are some
Minitab commands that may be useful this semester.
- In the Fall 2004 semester, I gave a HW #2 that is rather similar to the one
I'm giving you. If you want to examine it, here is
.pdf version of the assignment,
and here are the
correct answers for the Fall 2004
HW #2. (Note:
Here is the
sunspot data for Problem 4.)
- To produce the Agresti-Coull interval, replace
n by
n + z2 (where z is the alpha/2
critical value of the standard normal distribution), replace
y by
y + z2/2, and otherwise use the commonly used formula for the
standard interval. (The sample proportion will be replaced by a
modified value in 3 places, and the modified n is used in one
additional place by itself.) To learn more about the confidence
intervals I discussed during the 4th lecture, you can read the
article "Interval Estimation for a Binomial Proportion" in the May 2001
issue of Statistical Science.
Here is
a link that you
can use to get to a .pdf version of the paper.
(Note: I recommend also reading the comments given
by seven other statisticians that appear (with a rejoinder).
Although the authors of the paper do a good job of
presenting the facts, I don't agree with the way in which they interpret
them --- I believe that many of the opinions expressed by the others who
comment on the paper are better than those of the paper's authors. I
based the comments that I made in class on not just the original paper I
mentioned, but also on the comments supplied by the others, who had many
disagreements with the paper's authors.)
- If you're interested in the alternative point estimator for a
Bernoulli parameter that I described in class (at the end of my overhead
projector presentation), you can look at the article Some
problems in minimax point estimation by Hodges and Lehmann in Vol.
21 (1950) of Ann. Math. Stat.
- Here are the
correct answers for HW #2 and here are
more details about the answers for HW #2
(both of which I posted here only after I finished grading the papers).
HW #1
-
The nominal due date is Feb. 18,
but I'll take late papers up until 5 PM the following Thursday
(2/21).
- Be sure to read the lengthy instructions on the HW
#1 assignment to find out about submitting late papers.
- Here is a
.pdf version of the assignment. I'll
assume that everyone can access it unless I hear otherwise. Here is
answer sheet for HW #1. You
are to print this out and put your answers on the answer sheet.
- Be sure to round your answers exactly the way indicated on the answer sheet.
- In the Spring 2004 semester, I gave a HW #1 that is extremely similar to the one
I'm giving you. If you want to examine it, here is
.pdf version of the assignment,
and here are the
correct answers for that semester's
HW #1.
- Last year, having given the STAT 554 class a similar assignment, a student e-mailed
"In working on the 1st homework assignment, I don't know quite where to begin.
Am I to use the Minitab software to do each of the problems or is Minitab only used for certain problems?"
Since my response may be useful to some of you, I've posted it below.
I suggest using Minitab at least some for all of the problems
(even though in some cases tables or a calculator can be used).
You need to read in the notes to see what exactly it is you want to
compute, but then you can use Minitab to get all of the answers for 1 and
2 w/o writing stuff down. For 3, you might want to use pencil and paper
to arrive at a formula to evaluate, and then use Minitab to get the
numerical answers. HW #1 only hits on a few of the main points from the
first two weeks. Problems 1 and 2 address the main hypothesis testing
situation covered for the Bernoulli trials setting. Problem 3 is more of a
probability exercise designed to show something about the concept of convergence in
probability to a constant. Rather than look in the notes for how to do
it, just treat it like a probability problem and then realize at the end
that it provides a demonstration related to the law of large numbers ---
that the sample mean converges to the distribution mean.
- Here are the
correct answers for HW #1
(which I posted here only after I finished grading the papers).
I made minor point deductions if people had close to the right answer, but were slighlty off.
(It's especially bad if you give more digits than is requested and have the extra digits incorrect, since you're expressing high
accuracy by giving so many digits.) Also, if you give too many digits for an approximate answer (when an approximation was used) it's
not good, since it indicates a greater degree of accuracy than is warranted. I encourage you to pay attention to what I say in
class and what is in the homework instructions with regard to appropriate rounding of answers.