Download Key_unit3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Degrees of freedom (statistics) wikipedia , lookup

History of statistics wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Taylor's law wikipedia , lookup

Student's t-test wikipedia , lookup

Misuse of statistics wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Analysis of variance wikipedia , lookup

Transcript
Stat 3503/3602 — Unit 3: Random Effects One-Way Analysis of Variance — Partial Solutions
3.1.1. Make a worksheet as shown above. Proofread.
(a) Make dotplots of these data—four plots on the same scale. Are there any outliers?
Minitab standard graphics dotplots of data for the four leaves are as follows:
MTB > gstd
MTB > dotp ''Calcium';
SUBC> by 'Leaf'.
Leaf
1
:
.
.
-------+---------+---------+---------+---------+---------Calcium
Leaf
2
:
. .
-------+---------+---------+---------+---------+---------Calcium
Leaf
3
. :
.
-------+---------+---------+---------+---------+---------Calcium
Leaf
4
. .
. .
-------+---------+---------+---------+---------+---------Calcium
2.85
3.00
3.15
3.30
3.45
3.60
For each leaf, the four points seem to be grouped relatively close together. Leaf 1 probably has a slightly larger
sample variance than the other leaves because of the value at 3.28. However, the boxplot for Leaf 1 shows,
according to Minitab's criterion for boxplot outliers, that the 3.28 measurement is not sufficiently far away from the
other three measurements on Leaf 1 to qualify as an outlier:
MTB > boxp c1;
SUBC> by c2.
Leaf
----------I +
I-----------------
1
--------I
+
I----------
2
3
4
------I + I---------------I
+
I----------------+---------+---------+---------+---------+--------Calcium
2.85
3.00
3.15
3.30
3.45
If you simulate some 4-observation samples from any normal distribution, you will see that a pattern with one
observation slightly removed from the other three is not an unusual pattern. Because the pattern of relative
positions of data is the same for all normal distributions, you can use standard normal data for your simulation
experiment. Standard normal is Minitab's default random data distribution, so no subcommand is required. In
standard graphics mode, try: MTB > random 4 c10-c19 followed by MTB > dotp c10-c19.
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
2
(b) Do you see evidence that different leaves tend to have different amounts of calcium ("among leaf variation")?
“Among leaf” variation definitely seems present. The data for Leaves 2 and 3 do not overlap data for each other—
or for either of the other two leaves. This suggests that among leaf variation may be a significant factor in the
overall variation of the Calcium measurements. (The ANOVA procedure in Section 3.3 provides a formal test.)
(c) Does it seem that variances are the same for all four leaves ("homoscedasticity")? By hand, perform Hartley's Fmax
test of the null hypothesis that the four population variances are the same (use the tables in O/L). Also perform Bartlett's
test using Minitab menu path: STAT  ANOVA  Test for equal variances, Response = 'Calcium', Factor = 'Leaf'.
[See O/L 6e, p462 for an explanation of Bonferroni confidence intervals. Short explanation: These are relatively long CIs
based on confidence level (100 – 5/a)%, where a = 4, intended to give an overall error rate not exceeding 5% when the
four CIs are compared.]
Clearly, the sample variances for the four leaves differ somewhat, with Leaf 1 having the largest sample variance.
But from the plots above it would be a stretch to conclude that the population variances differ.
Hartley' Fmax test. Obtain the sample variances for the four leaves on a calculator, using Miniitab's describe
command and squaring the resulting sample standard deviations, or (perhaps more elegantly) as shown below:
MTB > desc 'Calcium';
SUBC> by 'Leaf';
SUBC> variance.
Descriptive Statistics: Calcium
Variable
Calcium
Leaf
1
2
3
4
Variance
0.0140
0.00507
0.00249
0.00482
Fmax = .014/.00249 = 5.62 < 39.2 from Table 12 in O/L (row df = 3, column t = 4). Accept null hypothesis of equal
population variances at 5% level.
Minitab:
Comparison of Sample Variances: Turnip Leaf Data
Bartlett's Test
Test Statistic
P-Value
1
2.11
0.551
Lev ene's Test
Test Statistic
P-Value
Leaf
2
0.50
0.690
3
4
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
95% Bonferroni Confidence Intervals for StDevs
0.8
All tests: The observed sample variances for the four leaves are consistent with equal population variances.
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
3
(d) These 16 observations show considerable variability. From what you see in the dotplot, do you think this variability
is mainly because the leaves have varying amounts of calcium, mainly because the analytic process for measuring
calcium is imprecise, or are both kinds of variation about equally important?
Just looking at the plots, it appears that the leaf-to-leaf variation in calcium contributed more to the overall
variability of the 16 observations than does the variability of the analytic process. The fact that there is so little
overlap among the four boxplots is a strong clue. (The ANOVA procedure in Section 3.3 confirms what we have
seen by exploratory data analysis.) So it is doubtful that both sources of variability are equally important. But even
the smaller source of variability may make a contribution of practical importance to investigators.
3.1.2.
Suppose that a formal statistical analysis shows that there are significant differences among groups (Leaves).
From the description of how and why the data were collected, is it important to make multiple comparisons among the
groups? To be specific, suppose there is strong evidence that Leaf 3 has a lot less calcium than the other three leaves.
How would you interpret this result to someone interested in the calcium content of turnip leaves?
Even if a formal statistical analysis shows significant difference among leaves, multiple comparisons are not
appropriate because the chosen Leaf is a random effect, not a treatment. For example, even if the calcium
content of Leaf 3 is significantly different from the other leaves, it means that the “among leaf” variability is large.
In subsequent work on turnip leaves, we will not see this particular leaf again. (If the four leaves were randomly
selected specimens representing four different varieties of turnips. then Variety would be a fixed effect, and it
would be important to know if Variety 3 typically contains more calcium. But then it would be better to have
several leaves from each Variety)
3.2.1.
The essential ingredients in computing an F ratio in a one-way ANOVA are the sizes, means, and standard
deviations of each of the a groups. This is true whether you have a fixed or a random effects model....
(a) What command/subcommand or menu path can be used to make output similar to the above? (In menus for Minitab
14 and 15, there is a way to select just the descriptive statistics you want. See if you can produce output that contains
exactly the information shown above.)
In order to produce the required table, follow the menu path:
STAT > Basic > Display descriptive, Variable = 'Calcium', By = 'Leaf'  Statistics, check boxes for Mean, SE of
Mean, Standard deviation, and N nonmissing.
Alternatively, use the following commands.
MTB > Describe 'Calcium';
SUBC>
By 'Leaf';
SUBC>
Mean;
SUBC>
SEMean;
SUBC>
StDeviation;
SUBC>
N.
Descriptive Statistics: Calcium
Variable
Calcium
Leaf
1
2
3
4
N
4
4
4
4
Mean
3.1075
3.4400
2.8125
3.3025
SE Mean
0.0592
0.0356
0.0250
0.0347
StDev
0.1184
0.0712
0.0499
0.0695
(b) MS(Error) in the ANOVA table can be found as MS(Error) = [0.11842 + 0.07122 + 0.04992 + 0.06952] / 4. Do this
computation and compare the result with the ANOVA table of the next section. Is the divisor best explained as a = 4 or
n = 4? Precisely which formulas in your textbook simplify to this result when you take into account that this is a
balanced design?
The divisor in this example is a = 4. This similar to the formula for MSE of a fixed-effects model in O/L 6e,
p407 for fixed effects ANOVA, with the substitution of our a for the their t = 5. Using the more general formula
for SSW on p410, we have the formula
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
4
MS(Error) = sW2 = SSW / (nT - a) = SS(Error) / (nT - a) = (ni – 1)si2 / (ni – a), with i = 1 to a.
Because all the ni are equal to 4 in our current example, this simplifies to (s12 + s22 + s32 + s42) / 4.
(c) MS(Group) = MS(Factor) = MS(Leaf) can be found from the information in this Minitab display as a multiple of
the variance of the four group means: 3.1075, 3.4400, 2.8125, and 3.3025. Find the variance of these means. What is the
appropriate multiplier? (For our data it happens that n = a = 4. Express the multiplier in terms of either n or a so that
you have a general statement.) What formulas in your textbook simplify to this result?
From the formulas on p410, with a = t:
–
First, y .. = (3.1075 + 3.4400 + 2.8125 + 3.3025) / 4 = 3.1656.
–
–
MS(Factor) = sB2 = SSB / (a – 1) = MS(Factor) / (a – 1) = n (y i. – y ..)2 / (a – 1).
MS(Factor) = 4[(3.1075 – 3.1656)2 + (3.4400 – 3.1656)2 + (2.8125– 3.1656)2 + (3.3025– 3.1656)2] / 3 = .29612
Compare with MS(Leaf) in the MInitab output of Section 3.3 of the Unit.
(d) Use the results of parts (b) and (c) to find the F ratio. What are the appropriate degrees of freedom? For the degrees
of freedom give both numbers and formulas.
F = .29612 / .0066 = 44.9 with 1 = a – 1 = 3 and  = a(n –1) = 12.
(e) [Estimate the leaf-to-leaf variance A2.]
The estimate of σ 2A is (MST – MSE) / n = (.29612 – .0066) / 4 = .07238.
σ 2A is greater than σ 2 = .0066, which means that the “among leaf” variance is greater than the “within leaf”
variance. This is consistent with the speculation in 3.1.1d.
3.3.1.
Make a normal probability plot of the residuals from this model in order to assess whether the data
are normal. In menus (STAT  ANOVA  Balanced) you can select such a plot under Graphs. Alternatively,
use additional subcommands to store residuals and make a (slightly different style of) probability plot:
SUBC> resids c3; and SUBC> pplot c3.
We show the results of the latter method, which makes a normal probability plot with confidence bands. (See the
top of the next page.) The residuals may have a shorter lower tail than is typical of a normal distribution
(downward curve of points at the left of the plot), but not enough for the Anderson-Darling test to reject normality
(P-value 12%) or for the plot to go outside the confidence bands. In any case, it is doubtful that any departure
from normality would be enough to invalidate the key conclusion that A2 is very much smaller than 2.
Probability Plot of Residuals
Normal - 95% CI
99
Mean
StDev
N
AD
P-Value
95
90
-2.77556E-17
0.07268
16
0.562
0.122
Percent
80
70
60
50
40
30
20
10
5
1
-0.3
-0.2
-0.1
0.0
Residuals
0.1
0.2
0.3
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
5
3.4.1.
In estimating σA2 from a balanced design as [MS(Group) – MS(Error)] / n, it is possible to get a negative
result. This can be awkward because, of course, we know that σA2 ≥ 0.
(a) In terms of the value of the F statistic (or F ratio), when will this method give a negative estimate of σ A2?
The estimate is (MST – MSE) / n, which is negative when MSE > MST or, equivalently, when F < 1.
(b) If a = n = 4 and σA2 = 0, then the F statistic has an F-distribution with numerator degrees of freedom ν1 = a – 1 = 3
and denominator degrees of freedom ν2 = a(n – 1) = 12. Use the command MTB > cdf 1; with the subcommand
SUBC> f 3 12. to find the probability of getting a negative estimate of σ A2 in these circumstances.
Following the instructions, we get Minitab output showing that there is probability 57.4% of getting a negative
estimate of A2 when the null hypothesis is true.
Cumulative Distribution Function
F distribution with 3 DF in numerator and 12 DF in denominator
x
1
P( X <= x )
0.573779
3.4.2.
In a fresh worksheet, generate fake data using the command MTB > random 10 c1-c5; and the subcommand SUBC> norm 100 10. Consider the columns as a = 5 groups of n = 10 observations each. Stack the
data and analyze according to a one-way random-effects model. Here it is known that σ = 10, σ2 = 100 and σA = 0. What
estimates does your analysis give? Repeat this simulation several times as necessary until you see a negative estimate of σA2.
MTB >
SUBC>
MTB >
MTB >
SUBC>
MTB >
SUBC>
SUBC>
SUBC>
rand 10 c1-c5;
norm 100 10.
name c11 'Response' c12 'Group'
stack c1-c5 c11;
subs c12.
anova c11 = c12;
random c12;
restrict;
ems.
ANOVA: Response versus Group
Factor
Group
Type
random
Levels
5
Values
1, 2, 3, 4, 5
Analysis of Variance for Response
Source
Group
Error
Total
DF
4
45
49
S = 10.4880
1
2
Source
Group
Error
SS
245.7
4949.9
5195.6
MS
61.4
110.0
F
0.56
R-Sq = 4.73%
Variance
component
-4.858
109.999
Error
term
2
P
0.694
R-Sq(adj) = 0.00%
Expected Mean
Square for Each
Term (using
restricted
model)
(2) + 10 (1)
(2)
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
6
In this case the probability of getting a negative estimate of the Group component of variance is about 58% (by the same
method as in 3.4.1 b), so the probability you will get a negative estimate within three tries is 1 – (1 – .58)3 = .93. The simulation
shown above was our second try, where we got 110.0 as the estimate of 2 and a negative estimate of A2.
The estimate of 2 is 110. A reasonable interpretation of a negative estimate of the Factor (or Group) component of variance,
as occurred here, is that the Factor component is 0 or positive and negligibly small.
In terms of statistical theory the kind of estimator we are using here is called a "method of moments" estimator or MME (one
based on means of variances). Another kind of estimator, considered to be superior in most cases, is a "maximum likelihood
estimator" or MLE. Although it cannot be negative in this case, the MLE requires advanced methods to compute. Bayesian
estimators of the variance components, usually computed using Gibbs sampling methods, are also nonnegative when realistic
prior distributions are used. However, if the MME is negative, then MLE and Bayesian estimators will likely be very near 0.
3.4.3.
The manufacture of a plastic material involves a hardening process. The variability in strength of the finished
product is unacceptably large and engineers want to know what may be responsible for the excessive variability. First,
five Batches (B1 – B5) of raw plastic are sampled at random. Ten specimens are then taken from each batch and
"hardened." Finally, the hardness of each of the 50 specimens is measured. There is some variability in how individual
specimens react to the hardening process, but the process of measuring hardness is known to have negligible error.
(a) Does the choice of batch introduce significant variability?
In a new Worksheet:
MTB >
MTB >
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
DATA>
MTB >
DATA>
DATA>
MTB >
SUBC>
SUBC>
SUBC>
name c1 'Hardness' c2 'Batch'
set c1
426 619 492 505 389
539 460 481 479 502
506 420 442 538 499
473 489 515 480 566
466 545 481 550 557
506 530 527 453 493
545 553 409 455 525
571 575 441 456 481
518 434 419 466 431
420 499 385 450 470
end
set c2
10(1:5)
end
anova c1 = c2;
random c2;
restrict;
ems.
ANOVA: Hardness versus Batch
Factor
Batch
Type
random
Levels
5
Values
1, 2, 3, 4, 5
Analysis of Variance for Hardness
Source
Batch
Error
Total
DF
4
45
49
S = 50.9474
SS
15378
116804
132182
MS
3845
2596
F
1.48
R-Sq = 11.63%
P
0.224
R-Sq(adj) = 3.78%
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
1
2
Source
Batch
Error
Variance
component
124.9
2595.6
Error
term
2
7
Expected
Mean Square
for Each
Term (using
restricted
model)
(2) + 10 (1)
(2)
With an F statistic of 1.48 and a p-value of 0.224, the null hypothesis cannot be rejected. The Batch component of
variance does not make a significant contribution to the variability of hardness measurements.
(b) Estimate the two variance components in this study (batch and hardening). Upon which component do you believe
that efforts to reduce product variability be concentrated?
The batch variance σA2 is estimated to be 124.9 and the “within batch” variance σ2 is estimated to be 2595.6.
Since the “within batch” variance is apparently much larger than the batch-to-batch variance, efforts should be
probably be spent in trying to get individual specimens to react more uniformly to the hardening process.
(c) Give a 95% confidence interval for µ.
MTB > mean c1
Mean of Hardness
Mean of Hardness = 488.62
The grand mean is 488.62. The variance of this estimate of  is (1/a) σA2 + (1/na) σ2, with a = 5 and n = 10.
Therefore, this variance estimate becomes (1/5)*124.9 + (1/50)*2595.6 = MS(Batch)/na = 3845/50 = 76.892.
With df(Batch) = a – 1 = 4, the 95% confidence interval is 488.62  t*76.892, where t* = t(.975, 4) = 2.77645,
resulting in the CI (494.27, 512.97) for .
(d) These are randomly generated data (patterned roughly after a real-life situation), so the true parameter values are
known. They are: µ = 500, σ = 50, σA = 15. Comment on how well or poorly you were able to estimate these values.”
The grand mean estimate was fairly close to the population mean, 488.62 estimate vs.  = 500.
The “within batch” standard deviation was estimated to be 2595.6 = 50.9 vs.  = 50.
The batch-to-batch standard deviation was estimated to be 124.9 = 11.2 vs. σA = 15.
Notes: SS(Error)/2 ~ CHISQ(df(Error)) = CHISQ(45). The values that cut off 2.5% from the lower and upper tails
of this distribution are 28.366 and 65.410, respectively. (For example, use tables or MTB > invcdf .025; with
SUBC> chisq 45. for the lower cutoff value; similarly for the upper cutoff value.) So a 95% CI for 2 is
(116804/ 65.410, 116804/ 28.366) or (1785.7, 4117.7). Taking square roots, we get a 95% CI for : (42.3, 64.2).
In R, this can be done in one line of code: sqrt(116804/qchisq(c(.975, .025),45)) returns
(42.25774, 64.16950). This is essentially the method of Section 7.2 of O/L.
Because the estimate of A2 is based on a linear combination of SS(Error) and SS(Factor) this estimate is not
distributed according to a chi-squared distribution, and it is more difficult to find a CI. Brownlee (Section 10.5)
suggests approximate methods for finding CIs of A2. Class handouts show how to find a CI for  = A2/2.
3.5.1.
In R, execute pf(1, 3, 12). Report the result and explain what it means in the setting of a one-factor
random-effect design with a = n = 4. Repeat for a design with a = 5 and n = 10.
In a design with a = n = 4, we have df(Batch) = a – 1 = 3 and df(Error) = a(n – 1) = 12, so the R code returns the
probability under the null hypothesis that the F-statistic in the ANOVA table happens to be less than 1.
Equivalently, of course, this is the probability that the MME of the batch variance A2 is negative.
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
8
In a design with a = 5 and n = 10, we have df(Batch) = 4 and df(Error) = 45. (The simulation in Problem 3.4.2 and
the data in 3.4.3 had these dimensions.) Here, the probability of getting a negative estimate of the batch variance
can be computed with the R code pf(1, 4, 45), which returns 0.5824692.
3.5.2.
Repeat the simulation of problem 3.4.2 in R using the following code. Repeat as necessary to see F < 1 (that
is, simulated data that give a negative estimate of A2). In view of your answer to problem 3.5.1, about how many
repetitions would the average student have to make?
Below are two runs of the program. Because all observations are generated according to the same normal
distribution, the batch variance is zero and H0: A2 = 0 is precisely true. It happens that in the first run we have
observed F > 1 (but do not reject H0 and would obtain a positive MME of the batch variance A2). By contrast, the
second run has F < 1 (so obviously we do not reject H0 and also we would obtain a negative MME of the batch
variance).
> a = 5; n = 10
> Y = rnorm(a*n, 100, 10)
> Batch = as.factor(rep(1:a, each=n))
> anova(lm(Y ~ Batch))
Analysis of Variance Table
Response: Y
Df Sum Sq Mean Sq F value Pr(>F)
Batch
4 837.2
209.3 1.6735 0.1728
Residuals 45 5627.7
125.1
> a = 5; n = 10
> Y = rnorm(a*n, 100, 10)
> Batch = as.factor(rep(1:a, each=n))
> anova(lm(Y ~ Batch))
Analysis of Variance Table
Response: Y
Df Sum Sq Mean Sq F value Pr(>F)
Batch
4 400.7
100.2 0.9066 0.4682
Residuals 45 4972.3
110.5
In the second part of 3.5.1, we have seen that in these circumstances P{F < 1} = 0.5825. Viewing the event
{F < 1} as a Success in repeated Bernoulli trials and defining X as a geometric random variable with Success
probability 0.5825 and E(X) = 1/0.5825 = 1.72, we would expect on average to have to do a little fewer than 2
runs of the program to see a simulated dataset that gives a negative MME for the batch variance.
3.5.3.
Use the data of problem 3.4.3 and the R code below that includes maximum likelihood estimators of the
grand mean and variance components. Comment, provide confidence intervals.
>
>
>
>
>
>
>
B1 = c(426, 539, 506,
B2 = c(619, 460, 420,
B3 = c(492, 481, 442,
B4 = c(505, 479, 538,
B5 = c(389, 502, 499,
Y = c(B1, B2, B3, B4,
anova(lm(Y ~ Batch))
473,
489,
515,
480,
566,
B5);
466, 506, 545, 571, 518, 420)
545, 530, 553, 575, 434, 499)
481, 527, 409, 441, 419, 385)
550, 453, 455, 456, 466, 450)
557, 493, 525, 481, 431, 470)
Batch = as.factor(rep(1:5, each=10))
Analysis of Variance Table
Response: Y
Df Sum Sq Mean Sq F value Pr(>F)
Batch
4 15378
3845 1.4811 0.2238
Residuals 45 116804
2596
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
9
> stripchart(Y ~ Batch, method="stack", xlab="Hardness", ylab="Batch",
+ main="Hardness Measurements on 5 Batches of Plastic")
> require (nlme)
Loading required package: nlme
[1] TRUE
> ml.fit = lme(Y ~ 1, random = ~1|Batch, method="ML")
> ml.fit
Linear mixed-effects model fit by maximum likelihood
Data: NULL
Log-likelihood: -267.9108
Fixed: Y ~ 1
(Intercept)
488.62
Random effects:
Formula: ~1 | Batch
(Intercept) Residual
StdDev:
6.995007 50.93958
Number of Observations: 50
Number of Groups: 5
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
10
> intervals(ml.fit)
Approximate 95% confidence intervals
Fixed effects:
lower
est.
upper
(Intercept) 472.8015 488.62 504.4385
attr(,"label")
[1] "Fixed effects:"
Random Effects:
Level: Batch
lower
est.
upper
sd((Intercept)) 0.1247125 6.995007 392.3435
Within-group standard error:
lower
est.
upper
41.44019 50.93958 62.61652
A comparison with results from the standard ANOVA and the MME estimate of the batch variance are is
appropriate:
In Problem 3.4.3 c, we obtained the MME 488.62 for , which is the same as the MME just above. In 4.3.4 c, the
95% CI for  is (494.27, 512.97)Above we have the CI (472.8, 504.4), which is longer and not centered at the
MLE.
In 3.4.3 d, we noted that a 95% CI for  is (42.3, 64.2), which is nearly the same as (41.4, 62.6) just above.
In 3.4.3 b, we found the MME of the batch variance σA2 to be 124.9, so the MME of A is 11.18, and we were not
able to find a corresponding CI. Above we have the MLE = 7.0 with a very long 95% CI (0.12, 392), reflecting the
fact that, with such a large error variance, five batches are not enough to get much of an idea as to the true value
of the batch variance.
3.5.4. [Illustrations of MLEs.]
For the binomial, the MME and the MLE agree. For estimating  from a random sample from UNIF(0, ), statistical
theory guarantees that the least variable unbiased estimator of  is based on the MLE. [An estimator T of  is said
to be unbiased if E(T) = . That is, on average it gives the right answer. Among unbiased estimators the least
variable one is often said to be best.]
The following simulation with n = 3 and (without loss of generality)  = 10, we illustrate the expectations and
standard deviations of the MME and MLE. A fairly simple probability problem is to find exact values for these
quantities, but here we are satisfied to use simulation to illustrate that SD(MLE) < SD(MME). The inequality holds
for all values of n > 1.
m = 100000; n = 3; th = 10
x = runif(m*n, 0, th); DTA = matrix(x, nrow=m)
mme = rowMeans(DTA)*2
mle = (4/3)*apply(DTA, 1, max)
mean(mme); sd(mme)
mean(mle); sd(mle)
> mean(mme);
[1] 10.00778
[1] 3.331157
> mean(mle);
[1] 10.00764
[1] 2.582315
sd(mme)
sd(mle)
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.
Stat 3503/3602 — Unit 3: Partial Solutions
11
Below we show histograms of MME and MLE plotted on the same scale. Notice the difference in the shapes of
the two distributions.
MME is symmetrical so its mean and median are both very near to  = 10. Although MLE has a much smaller
variance than MME, notice that its distribution is not symmetrical. While its mean is very near  = 10, its median is
noticeably above 10 (closer to 10.6).
Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, Winter 2005. Copyright © 2005 by Bruce E. Trumbo. All rights reserved.