Due date: Friday 11/21, 9:00am
Significance testing
01
01
Testing paperclips - Likelihood of error
A factory assembly line machine is cutting paperclips to length before folding. Each paperclip is supposed to be
long. The length of paperclips is approximately normally distributed with standard deviation . (a) Design a significance test with
that is based on the average of 5 measurements (sample mean). What is the rejection region? What is the probability of Type I error? (b) What is the probability of Type II error, given that the average paperclip length on the machine is actually
? Link to originalSolution
01
(a)
- Null Hypothesis
: “The expected paper clip length is not inches” - Alternative Hypothesis
: “The expected paper clip length is inches” Let
be the length of the paperclips for our sample. For the sample, assume and . Thus, . By symmetry, since we want a two-tailed test, it suffices to find the rejection region at one tail (we can then extrapolate for the second tail). We then have, for
the lower rejection region: Solving for
, we have . By symmetry, the lower bound for our upper rejection region is . Thus, our rejection region is By definition,
.
(b) A Type-II error occurs when the Null Hypothesis is incorrectly accepted, when it is actually false.
Thus,
. Thus, now let
. We then have: Link to original
02
02
Link to originalTesting a coin by flipping until heads
Design a significance test to test the hypothesis that a given coin is fair. You think it may be biased towards tails.
Your test runs the following experiment: flip the coin repeatedly until the first time a heads comes up. Let
be the flip number of the first heads. This is your decision statistic. Your test should have significance level
. Which of these coins would pass your test?
- Two-headed coin
- Two-tailed coin
- Both
- Neither
03
05
Shipping time test
The number of days it takes for a package to arrive after being shipped with a particular company is a random variable,
. When the shipping process is operating at full capacity and delays are not common, the PMF of is given in the following table:
1 2 3 4 5 6 7 8 9 0.041 0.229 0.379 0.237 0.045 0.021 0.019 0.017 0.012 Design a significance test at the
level that uses the value of X for one package to test the null hypothesis: the shipping process is operating at full capacity. You should clearly state which values of X are in the rejection region. Link to originalSolution
03
The rejection region is
Link to original. So if shipping takes 8 or 9 days, we will reject .
Binary hypothesis testing
04
01
Link to originalIdentifying Uranium
You are testing gram samples of pure Uranium to see if they are enriched. You have a Geiger counter that counts a number of gamma rays that come from nearby fission events in 1 second intervals after you press the count button.
If the sample is enriched, you expect a Poisson distribution
of gamma rays in the counter with an average of 20. If the sample is not enriched (the null hypothesis), the average count will be 10. (a) Design an ML test to decide whether it is ordinary
or enriched ( ). What is ? What are the probabilities of Type I, Type II, and Total error? (b) After running the test many times, you have noticed that 70% of the samples are ordinary, while 30% are enriched. Now design an MAP test. What is
? What are the probabilities of Type I, Type II, and Total error? (c) Missing a bit of enriched Uranium is obviously a major problem. The damage to your reputation and pocketbook of missing enriched Uranium is
the damage caused by incorrectly labeling ordinary Uranium as enriched. Now design an MC test. What is ? What are the probabilities of Type I, Type II, and Total error? (d) What is the expected cost of each application of the MC test, assuming the cost of a false alarm is $10,000? What is this number for the MAP test?
05
04
Medical testing
A doctor is planning to use a new, inexpensive medical test to detect a particular disease. The test score,
, tends to be higher for patients with the disease. The PMFs for the test score for patients with and without the disease are shown below. From a previously used, more expensive test, it is known that 20% of the population has this disease. Patients without the disease:
1 2 3 4 5 0.5 0.3 0.15 0.05 0 Patients with the disease:
1 2 3 4 5 0.05 0.1 0.3 0.35 0.2 Design a binary hypothesis test that will minimize the doctor’s probability of error. Let
: the patient does not have the disease and : the patient does have the disease. Determine for which test scores the doctor should diagnose the patient as having the disease. Clearly denote which scores result in which decisions. Link to originalSolution
08
1 2 3 4 5 Link to original
- If
or the doctor should diagnose the patient as having the disease. - If
the doctor should not diagnose the patient as having the disease.