Homework Assignment #2 Solutions in bold

[Pages:8]Homework Assignment #2 Solutions in bold

Chapter 5 1. Here is a pizza, ordered from the Venn Pizzeria on Bayes Street.

The pizza is divided into eight slices, and the slices might have pepperoni, mushrooms, olives, and/or anchovies. Imagine that, late at night, you grab a slice of pizza totally at random, i.e. there is a 1/8 chance that you grabbed any one of the eight slices. Base your answers to the following questions in the diagram.

a, What is the chance that your slice had pepperoni on it?

There are eight slices, and five of them have pepperoni: 5/8

b. What is the chance that your slice had both pepperoni and anchovies on it?

Out of eight slices, two have both pepperoni and anchovies: 2/8=1/4

c. What is the probability that your slice had either pepperoni or anchovies on it?

Out of eight slices, seven have either pepperoni or anchovies: 7/8

d. Are pepperoni and anchovies mutually exclusive, on slices from this pizza?

No - there are two slices that have both.

e. Are olives and mushrooms mutually exclusive, on slices from this pizza?

Yes, you can't have both on one slice.

f. Are getting mushrooms and getting anchovies independent, when choosing slices from this pizza?

Pr[M&A] = 1/8

Pr[M]*Pr[A]=3/8 * 4/8 = 12/64 = 3/16

Since Pr[M&A] Pr[M]*Pr[A], then these two events are not independent.

g. If I pick a slice from this pizza and tell you that is has olives on it, what is the chance that it also has anchovies?

Two slices have olives. Out of these two, only one has anchovies. So: Pr[anchovies | olives] = 1/2

You can also solve this with the general multiplication rule, rearranged.

Pr[anchovies & olives] = Pr[olives]*Pr[anchovies | olives]. Rearranging, Pr[anchovies | olives] = Pr[anchovies & olives] / Pr[olives] Pr[anchovies | olives] = (1/8) / (2/8) = 1/2

h. If I pick a slice from this pizza and tell you that is has anchovies on it, what is the chance that it also has olives?

Four pieces have anchovies. Of these, only one also has olives, so Pr[olives | anchovies] = 1/4

Or, using the approach above, Pr[olives | anchovies] = Pr[anchovies & olives] / Pr[anchovies] Pr[olives | anchovies] = (1/8) / (1/2) = 2/8 = 1/4

i. Seven of your friends each choose a slice at random and eat them without telling you what they were. What is the chance that the last slice left has olives on it?

The fact that your friends ate all the pizza is not relevant here. All that matters is that two out of the eight slices have olives. So,

Pr[olives] = 2/8 = 1/4

j. You choose two slices at random from this pizza. What's the chance that they both have olives on them? (Be careful - after removing the first slice it is no longer there)

For the first slice, Pr[olives] = 2/8 = 1/4 For the second slice, there are now seven slices left. You just picked and ate one with olives, so now there's only one with olives left. So

Pr[olives] = 1/7

Pr[both olives] = 1/4 * 1/7 = 1/28

k. What's the probability that a randomly chosen slice does not have pepperoni on it?

Pr[not pepperoni] = 1-Pr[pepperoni] = 1 - 5/8 = 3/8

l. Draw a pizza for which mushrooms, olives, anchovies, and pepperoni are all mutually exclusive.

The requirement here is that no single piece contains more than one of these items. For example,

12. After graduating from your university with a biology degree, you are interviewed for a lucrative job as snake handler in a circus sideshow. As part of your audition, you must pick up two rattlesnakes from a pit. This pit contains eight snakes: three of them have been defanged and are harmless, but the other five are venomous. Unfortunately, budget cuts have eliminated the herpetology course from the curriculum; therefore you have no way of telling which snakes are dangerous and which have no fangs. You pick up one snake with your left hand and another snake with your right.

(a) What is the probability that you picked up no venomous snakes?

Pr[no venemous snakes] = Pr]First snake not venemous & second snake not venemous]= Pr[First snake not venemous]*Pr[Second snake not venemous]= 3/8 * 2/7 = 6/56 = 3/28 = 0.107

(b) Assume that each venomous snake has an equal probability of biting you if it were picked up. This probability is 0.8. The defanged snakes do not bite. What is the chance that in picking up your two snakes that you are bitten at least once?

Pr[bitten at least once] = Pr[bitten by first snake OR bitten by second snake] But these two events are not musually exclusive!

Pr[bitten by first snake ]+ Pr[ bitten by second snake] - Pr[bitten by both snakes]

for the first snake, Pr[bitten] = Pr[poisonous & bites] = Pr[poisonous] * Pr[bites] = 5/8 * 0.8 = 0.5

for the second snake, the probabilities depend on the first snake caught.

Pr[bitten by second snake] = Pr[first snake poisonous] Pr[bitten by second snake | first snake poisonous] + Pr[first snake not poisonous] Pr[bitten by second snake | first snake not poisonous]

Using the equations above,

Pr[bitten by second snake | first snake poisonous] = 4/7 * 0.8 = 0.457

Pr[bitten by second snake | first snake not poisonous] = 5/7 * 0.8 = 0.571

So, Pr[bitten by second snake] = 5/8 * 0.457 + 3/8 * 0.571 = 0.286 + 0.214 = 0.5

Pr[bitten by both snakes] = 5/8 * 0.8 *4/7 * 0.8 = 0.229

Thus, Pr[bitten by first snake ]]+ Pr[ bitten by second snake] - Pr[bitten by both snakes] = 0.5 + 0.5 - 0.229 = 0.771

This problem can be done other ways as well (e.g. using a probability tree, using the law of combined probabilities).

(c) Following from part (b), assume that you picked up only one snake and it did not bite you. What is the probability that this snake is defanged?

Using Bayes theorem:

Pr[snake defanged | snake did not bite] = (Pr[snake did not bite | defanged] Pr[snake defanged] )/Pr[snake did not bite]

Defanged snakes do not bite, so Pr[snake did not bite | defanged] = 1

We also know Pr[snake defanged] = 3/8

Pr[snake did not bite] = 1 - Pr[bites] = 1 - 0.5 = 0.5

So,

Pr[snake defanged | snake did not bite] = (1 * 3/8) / 0.5 = 0.75

Chapter 6.

2.Do people have powers of extrasensory perception (ESP)? Some people claim to have such abilities or to know someone who has them. Other people are entirely disbelieving of such claims. Imagine that you were to set up an experiment to test the existence of ESP. Each trial in your experiment involves one person privately

rolling a fair six-sided die and holding the image of the face that turned up firmly in his mind. In another room, a second person attempts to identify the result correctly.

a) What would be the null hypothesis for your test?

The probability of choosing the correct result is 1/6 (po = 1/6).

b) What would be the alternative hypothesis? Should it be one-sided or two-sided? Why?

The probability of choosing the correct result is greater than 1/6 (po > 1/6).

This should be a one-sided test because it is set up to test for ESP. The opposite result, that this person is choosing the correct result less often than predicted by chance, would not be called ESP, and doesn't merit consideration here.

11.Imagine an experiment with guppies in which females from a wild population are presented with a choice of two males. One of the males is from her own population, whereas the other is from a second population in a nearby stream. The goal of the study is to test whether females have a preference. A total of 18 females is tested, all randomly sampled from the population. Males are also randomly sampled. The same males are never used more than once, to ensure independence of experimental trials. Twelve females choose the male from her own population, whereas six females choose the male from the other population. a) What are the null and alternative hypotheses for the test?

Ho: females have no preference for males from either stream population(po = 0.5) Ha: females prefer males from one stream population over the other.

b) Why should the test be two-sided?

Because either result would be interesting: the females prefer males from their own stream, or prefer males from a neighboring stream. Two different investigators might have a reason for expecting either of these outcomes.

c) Using the sampling distribution under H0 given in Table 6.2B, calculate the Pvalue for the

test.

P=2 * (Pr[12]+Pr[13]+Pr[14]+Pr[15]+Pr[16]+Pr[17]+Pr[18]) P = 2 * (0.0708 + 0.0327 + 0.0117 + 0.0031 + 0.0006 + 0.00007 + 0.000004) P = 0.24

d) What is the interpretation of the P-value in (c)?

We do not reject the null hypothesis.

e) What is the best estimate, from the data, of the population parameter, p?

Define p as the proportion of times females choose males from their own population. Then

p = 12/18 = 0.67

15. Imagine that two researchers independently carry out clinical trials to test the same null hypothesis, that COX-2 selective inhibitors (which are used to treat arthritis) have no affect on the risk of cardiac arrest. They use the same population for their study, but one experimenter uses a sample size of 60 subjects, whereas the other uses a sample size of 100. Assume that all other aspects of the studies, including significance levels, are the same between the two studies. a) Which study has the higher probability of a Type II error, the 60-subject study or the 100-subject study?

The 60-subject study. Smaller sample sizes have less chance of rejecting the null hypothesis even if it's false.

b) Which study has higher power?

The 100-subject study. Since power = 1 - Pr[Type II error], this follows from the above argument.

c) Which study has the higher probability of a Type I error?

Pr[Type I error] = alpha, the significance level. Since this is the same in both studies, they both have the same probability of type I error.

d) Should the tests be one-tailed or two-tailed? Explain.

These should be two tailed, because either result would be of interest - either the drug was associated with more cardiac arrests (bad side effect?) or less (potential treatment option?) than expected by chance.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download