# Introduction to Bayesian statistics - Bolstad M.

ISBN 0-471-27020-2

**Download**(direct link)

**:**

**87**> 88 89 90 91 92 93 .. 126 >> Next

They decided that to determine whether or not the treatment was effective in increasing the yield of milk protein, they would perform the one-sided hypothesis test

Ho : pd < 0 vs H1 : pd > 0

at the 95% level ofsignificance. Aleece and Brad had normal posteriors, so they used Equation 11.4 to calculate the posterior probability of the null hypothesis. Curtis had a numerical posterior, so he used Equation 11.3 and performed the integration using the Minitab macro tintegral.mac. The results are shown in Table 12.3.

MAIN POINTS

223

Figure 12.2 Aleece’s, Brad’s and Curtis’s posterior distributions.

Table 12.3 Results of Bayesian one-sided hypothesis tests

person posterior P(Md < Gjdi? ...? dn)

Aleece Brad Curtis normal(7.G7,69.712) normal(6.33,65.832) numerical P(Z < ™) =.4596 P(Z < ) =.4619 Zoo g(Mdjdi ,...,dn)d^ =.4684 don’t reject don’t reject don’t reject

Main Points

• The difference between normal means are used to make inferences about the size of a treatment effect.

• Each experimental unit is randomly assigned to the treatment group or control group. The unbiased random assignment method ensures that both groups have similar experimental units assigned to them. On average, the means are equal.

• The treatment group mean is the mean of the experimental units assigned to the treatment group, plus the treatment effect.

• If the treatment effect is constant, we call it an additive model, and both sets of observations have the same underlying variance, assumed to be known.

• If the data in the two samples are independent of each other, we use independent priors for the two means. The posterior distributions ^ijyii, ...,ynii and M2jyi2,..., УП22 are also independent of each other, and can be found using methods from Chapter 10.

224

BAYESIAN INFERENCE FOR DIFFERENCE BETWEEN MEANS

• Letpd = Р1 -P2. Theposteriordistributionofpd|yn, ...,Ущ1,У12,.. .,Уп22 is normal with mean md = m1 - m2 and variance (sd)2 = (s1 )2 + (s2)2

• The (1 - a) x 100% credible interval for pd = p1 - p2 is given by

md ± Za/2 x sd .

• If the variance is unknown, use the pooled estimate from the two samples. The credible interval will have to be widened to account for the extra uncertainty. This is accomplished by taking the critical values from the Student’s t table (with n1 + n2 - 2 degrees of freedom) instead of the standard normal table.

• The confidence interval for pd|y11?..., yni1,y12,..., yn22 is the same as the Bayesian credible interval where flat priors are used.

• If the variances are unknown, and not equal, use the sample estimates as if they were the correct values. Use the Student’s t for critical values, with the degrees given by Satterthwaite’s approximation. This is true for both credible intervals and confidence intervals.

• The posterior distribution for a difference between proportions can be found using the normal approximation. The posterior variances are known, so the critical values for credible interval come from standard normal table.

• When the observations are paired, the samples are dependent. Calculate the differences d = y41 - yi2 and treat them as a single sample from a normal (pd, ad), where pd = p1 - p2. Inferences about pd are made using the single sample methods found in Chapters 10 and 11.

Exercises

12.1 The Human Resources Department of a large company wishes to compare two methods of training industrial workers to perform a skilled task. Twenty workers are selected, and 10 of them are randomly assigned to be trained using method A, and the other 10 are assigned to be trained using method B. After the training is complete, all the workers are tested on the speed of performance at the task. The times taken to complete the task are:

EXERCISES 225

Method A Method B

115 123

120 131

111 113

123 119

116 123

121 113

118 128

116 126

127 125

129 128

(a) We will assume that the observations come from normal(pA,a2) and normal(pB, a2), where a2 = 62. Use independent normal (m, s2) prior distributions for ^A and ^B, respectively, where m = 1GG and s2 = 2G2. Find the posterior distributions of ^A and ^B, respectively.

(b) Find the posterior distribution of ^A - ^B.

(c) Find a 95% Bayesian credible interval for ^A - ^B.

(d) Perform a Bayesian test of the hypothesis

H0 : ^a - MB = G versus Hi : ^a - MB = G

at the 5% level of significance. What conclusion can we draw?

12.2 A consumer testing organization obtained samples of size 12 from two brands of emergency flares, and measured the burning times. They are:

226

BAYESIAN INFERENCE FOR DIFFERENCE BETWEEN MEANS

Brand A Brand B

17.5 13.4

21.2 9.9

20.3 13.5

14.4 11.3

15.2 22.5

19.3 14.3

21.2 13.6

19.1 15.2

18.1 13.7

14.6 8.0

17.2 13.6

18.8 11.8

(a) We will assume that the observations come from normal^A^2) and normal(мв,a2), where a2 = 32. Use independent normal (m, s2) prior distributions for ма and мв, respectively, where m = 20 and s2 = 82. Find the posterior distributions of ма and мв, respectively.

**87**> 88 89 90 91 92 93 .. 126 >> Next