Docsity

Test 1 - Spring 2007 - Answer Key | Applied Bayesian Statistics | STAT 4444, Exams of Statistics

Toggle sidebar
bg1
Print Name: KEY KEY
Instructions. Please print your name at the top of each page now.
This is a closed-book, closed-note, 75 minute test. You may use a calculator but you may
not use scratch paper. Show all work on these pages or on the backs. Pledge below and print
your name at the top of each page.
Honor Pledge. I pledge that I have neither given nor received help on this test.
Signature ___________________________________________________________________
Binomial Distribution. If the random variable X is binomially distributed with probability
π
if
“success” for each of n independent trials, then
{}() ()
1 , 0,1,...,
Pf
0, elswhere
nx
x
n
x
n
Xx x x
ππ
−
⎧⎛⎞ −=
⎪⎜⎟
== =
⎨⎝⎠
⎪
⎩
where the binomial coefficient
()
()( )
()
11
!,1
!! 11
nnn n x
nnx
xxnx xx
−−+
⎛⎞
== ≥
⎜⎟ −−
⎝⎠
"
"≥
3
1
3
=
and
0! = 1
The binomial coefficients are also given in Pascal’s triangle, which is based on the facts that
1
0
n
⎛⎞
=
⎜⎟
⎝⎠ and
1
11
nnn
xxx
+
⎛⎞⎛⎞⎛⎞
=+
⎜⎟⎜⎟⎜⎟
++
⎝⎠⎝⎠⎝⎠
Thus, the first 4 rows of Pascal’s triangle are
01
0
11
11
01
22 2
121
01 2
33 3
13 3
01 2
⎛⎞
=
⎜⎟
⎝⎠
⎛⎞ ⎛⎞
==
⎜⎟ ⎜⎟
⎝⎠ ⎝⎠
⎛⎞ ⎛⎞ ⎛⎞
== =
⎜⎟ ⎜⎟ ⎜⎟
⎝⎠ ⎝⎠ ⎝⎠
⎛⎞ ⎛⎞ ⎛⎞ ⎛⎞
== =
⎜⎟ ⎜⎟ ⎜⎟ ⎜⎟
⎝⎠ ⎝⎠ ⎝⎠ ⎝⎠
Stat 4444, Test 1, Spring 2007 1 Test1-07s-KEY.doc 2/26/2007
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Test 1 - Spring 2007 - Answer Key | Applied Bayesian Statistics | STAT 4444 and more Exams Statistics in PDF only on Docsity!

Instructions. Please print your name at the top of each page now.

This is a closed-book, closed-note, 75 minute test. You may use a calculator but you may not use scratch paper. Show all work on these pages or on the backs. Pledge below and print your name at the top of each page.

Honor Pledge. I pledge that I have neither given nor received help on this test.

Signature ___________________________________________________________________

Binomial Distribution. If the random variable X is binomially distributed with probability π if

“success” for each of n independent trials, then

{ } ( )

(^1 ) ,^ 0,1,..., P f 0, elswhere

n (^) x n x x n X x x x

⎪⎜ ⎟ −^ =

where the binomial coefficient

( )

( ) ( ) ( )

n (^) n n n n x n x x x n x x x

⎛ ⎞^ −^ −^ +

⎜ ⎟ =^ =^ ≥

⎝ ⎠ −^ −

and 0! = 1 The binomial coefficients are also given in Pascal’s triangle, which is based on the facts that

⎛^ n ⎞ ⎜ ⎟= ⎝ ⎠

and

n n n x x x

⎜ ⎟ =^ ⎜ ⎟ +⎜ ⎟

⎝ +^ ⎠ ⎝ ⎠ ⎝ + ⎠

Thus, the first 4 rows of Pascal’s triangle are 0 1 0 1 1 1 1 0 1 2 2 2 1 2 1 0 1 2 3 3 3 1 3 3 0 1 2

⎜ ⎟ =^ ⎜ ⎟=

⎜ ⎟ =^ ⎜ ⎟ =^ ⎜ ⎟=

⎜ ⎟ =^ ⎜ ⎟ =^ ⎜ ⎟ = ⎜ ⎟

A. Circle the one best answer. Suppose that John flips a fair coin and rolls a fair (6-sided) die. Consider the following three events. A = {Die is even} B = {Die is odd} C = {Coin is heads}

  1. The events A and B are

(2)^ (1)^ mutually exclusive

(2) independent (3) both of the above (4) neither of the above

  1. The events A and C are (1) mutually exclusive (2) independent (3) both of the above (4) neither of the above B. Circle True or False. Let A and B be events on a common probability space.

(2)^ 3.^ True or False:^ P^ (^ A )^^ +^ P^ (^ A )=^1

4. True or False: P ( A B | ) + P ( A B ^ | )= 1

5. True or False: P ( A B | ) + P ( A B | ^ )= 1

Table 1.

x

pmf f( x )

cdf F( x )

C. Discrete Random Variables. Consider the random variable X with probability mass function (pmf) given in.

  1. Compute the cumulative distribution function and enter it into.
  1. Compute the mean of X.

(3) ¼ or 0.

Test Score (19) /this page (19) cumulative

E. Quality and Productivity. [Hint: Read all of this question, i.e., E.14 through E.18, before answering any part of it.] A manufacturer has three machines, M 1 , M 2 , and M 3. M 1 is the

slowest but most reliable. It produces 20% of the items with only 1% being defective. M 2 has 35% of the production, with a defective rate of 3%. M 3 does the remainder of the production, but has a defective rate of 5%. The production and defective rates of each of the machines is summarized in Table 2 to the right.

  1. What percentage of all items produced will be defective?

Table 2 M productio n

defectiv e 1 0.20 0. 2 0.35 0. 3? 0.

  1. If an item is found to be defective, what is the probability that it was produced by M 1?

(3) Given: U = {all items manufactured}. Mi = {items by machine i}, i = 1,2,3. D = {defective items}. P(Mi), i=1,2. P(D|Mi), i=1,2,3. To find: P(D). Total Prob: P(D) = P(M1)P(D|M1) + P(M2)P(D|M2)

  • P(M3)P(D|M3) = 0.0350.
  1. By M 2?

M P(M) P(D|M) P(M,D) P(M|D) Prior Liklihood Joint Posterior 1 0.20 0.01 0.0020 0. 2 0.35 0.03 0.0105 0. (3) (^3) 0.45 0.05 0.0225 0. 1.00 0.0350 1.

  1. By M 3?

(3)^ 0.

Test Score = 37 + 12 = 49

  1. To check the computations of E.14 through 17 , and to expose the application of Bayes Law, complete the following table, Table 3. Table 3

M Prior Liklihood Joint Posterior

1/cell 2 0.35 0.03 0.0105 0. up to (10)

F. Assume that for each machine of question B, the quality (defective or non-defective) of successive items is independent, with the probabilities given in Table 2 for each machine. If a single machine produced 1 defective and 2 non-defectives, (Details in Appendix F)

  1. Compute the probability that is was they were produced by M 1?

  2. compute the probability that is was they were not produced by M 1?

Given: As in question and Table 2, Ω = {all items manufactured}. Mi = {items by machine i}, i = 1,2,3. D = {defective items}. P(Mi), i=1,2. P(D|Mi), i=1,2,3. But here we have three independent

replications of that experiment (Ω, E, P), with indicator random variables defined on this probability space, I 1 , I 2 , I 3 , where {Ij = 1} = {D}, and {Ij = 0} = {not D}.

X = (I 1 + I 2 + I 3 ) is the number of defective in three trials, and we are interested only in the event, or evidence, E = {X = 1}. X|M ~ Binomially[n=3, πΜ=P(D|M)], yielding

M P(D|M) P(M) P(E|M) P(M,E) P(M|E) Liklihood Prior Liklihood Joint Posterior 1 0.01 0.20 0.029403 0.0059 0. Test Score 2 0.03^ 0.35^ 0.084681^ 0.0296^ 0. 49 + 16 = 65 3 0.05^ 0.45^ 0.135375^ 0.0609^ 0. 1.00 0.0964 1.

Appendix

D. Rare Disease. Only one in 2,000 adults is afflicted with a certain rare disease.

Given: Ω = {all adults}.

D = {diseased} ⊂ Ω.

(D)(not T)

(not D)(T)

DT

(not D)(not T)

P(D) = 0.0005.

When an individual has the disease, a positive test result will occur 99% of the time (sensitivity of the test),

T = {Test positive} ⊂ Ω. P{T|D} = 0.99 = sensitivity.

and, when an individual does not have the disease, a negative test result will occur 98% of the time (specificity). P{Not T|Not D} = 0.98 = specificity.

The false positive rate is 2% therefore.

→ P{T|Not D}=0.02.

  1. Compute the probability that a randomly selected adult will show a positive result? Show your work on the right and put the numerical answer in the box.

To find: P(T)

Law of Total Prob: Total Prob → P(T) = P(TD)+P[(T)(not D)] = P(D)P(T|D) + P(not D)P(T|not D) = (0.0005)(0.99)+(1-0.0005)(0.02) = 0.000495 + 0.01999 = 0.

D

not D

(D)(not T)

P[(not D)(T)] = 0.

P(DT)

(not D)(not T)

  1. Given that a person has tested positive, compute the probability that he or she has the

disease?

To find: P(D|T) Prior (to T) Probability of D Bayes Law → P(D|T) = P(DT)/P(T) = [P(T|D)/P(T)]P(D) P(D) = 0. = P(D)P(T|D) /P(T) = (0.0005)(0.99)/(0.020485) = 0.000495/0.020485 P(not D) = 0. = 0. =0.

Incorporate knowledge of T by Law of Total Probability

P(DT)

= 0.000495 (D)(not T)

P[(not D)(T)] (not D)(not T) = 0.

(D)(not T)

P[(not D|T)] = 0.

P(D|T)

(not D)(not T)

Apply Bayes Theorem to obtain posterior (to T) probability of D|T

Posterior (to T) probability of D given T

Bayesian Universe

P(X|pi=0.05) 0 1 2 3

  • π Prior Liklihood X
  • 0.01 0.20 P(X|π=0.01)= 0.970299 0.029403 0.000297 0.
  • 0.03 0.35 P(X|π=0.03)= 0.912673 0.084681 0.002619 0.
  • 0.05 0.45 P(X|π=0.05)= 0.857375 0.135375 0.007125 0.
      1. P(X|pi=0.01)
      1. P(X|pi=0.03)
  1. compute the probability that is was they were produced by M 1?

M P(D|M) P(M) P(E|M) P(M,E) P(M|E)

= πM Prior Liklihood Joint Posterior

1 0.01 0.20 0.029403 0.0059 0.

2 0.03 0.35 0.084681 0.0296 0.

3 0.05 0.45 0.135375 0.0609 0.

1.00 0.0964 1.

  1. compute the probability that is was they were not produced by M 1?