Monday, October 17, 2016

Probability

This semester, I am doing Introduction to Statistics as an elective. (Yes, I'm a nerd. As if you didn't already know that.)

These posts will be a bit different in that I'm not going to go through the lectures, but instead I'm going to work through some of the practise problems. I'm not entirely sure if this breaches copyright but if it does, I'll take these posts down.

Next week we have a topic test on Modules 1-4. I'm going to work backwards from Module 4 to Module 1, so accordingly this post is actually on content from Module 4.

1. A 6-sided die is rolled.

a) What is the sample space for this experiment?
The "sample space" is simply a list of all possible outcomes, so the sample space for this is S = {1, 2, 3, 4, 5, 6}.

b) What outcomes are associated with the event E of "an even die roll is observed?
2, 4 and 6.

2. States and Outcomes

a) You flip a coin 2 times. How many states are possible for the outcome of this experiment?
There are four states: HH, HT, TH or TT.

b) You flip a coin 4 times. How many states are possible for the outcome of this experiment?
There are 2^4 = 16 states, that is 2 possibilities for the first coin multiplied by 2 for the second, 2 for the third etc. If you don't believe me, you can write out all of the outcomes, but that's a waste of time that you could be spending watching Netflix.

c) You roll a 6-sided die 3 times. How many states are possible for the outcome of this experiment?
On a similar vein to the previous question, the answer here is 6^3 (i.e. 6 possibilities for the first roll multiplied by 6 for the second, etc.)

d) You question 5 survey participants, and ask them whether they prefer coffee, tea or soft drinks. How many states are possible for the outcome of this experiment?
3^5 (3 possibilities for the first participant multiplied by 3 for the second etc. Be careful to do 3^5 here and not 5^3.)

3. Number of occurrences- Combinations

a) For 2 coin flips, how many ways can you get 1 or more heads?
For two flips it's relatively easy to just write out all the options, which are HH, HT, TH and TT. As you can see there are three ways to get one or more heads.

b) For 4 coin flips, how many ways can you get 1 or more heads?
Here the easiest thing to do would be to find out the number of ways to get 0 heads and subtract that from the number of total combinations. The number of total combinations is 2^4 = 16, and there's only one way to get 0 heads (TTTT). Hence there are 15 ways to get 1 or more heads.

c) When rolling 3 six-sided dice, how many ways can you get a total of 4 or less over the three dice?
This one you can also kind of write out. 1+1+1 = 3, 1+1+2 = 4, 1+2+1 = 4, 2+1+1 = 4. Hence there are 4 ways to get a total of 4 or less.

d) You question 5 survey participants, and ask them whether they prefer coffee, tea or soft drinks. How many ways can there be 3 or more "coffee" responses?
For this question, you can use the "n choose r" formula, which you might remember if you did 3CD maths in year 11/12. This formula is (n choose r) = (n!)/(r!(n-r)!).

Firstly, let's choose exactly 3 coffee responses from the 5 participants. This gives (5 choose 3) = (5!)/(3!2!) = 20/2 = 10
Now choose 4 from 5: (5 choose 4) = (5!)/(4!1!) = 5/1 = 5
And finally choose 5 from 5, which is obviously just 1 (all coffee): 1
The sum is 10 + 5 + 1 =16.

An alternative way of doing this would be to find the number of 2 or fewer "coffee" responses and subtract from the total number of responses, but that's too much effort.

4. Events. For each experiment and event of interest, identify how many states of the outcome are covered/included in the given event, what fraction of all possible outcomes are covered by the event and if possible, estimate the probability of the event.

a) You flip a coin 2 times, and you are interested in the event "one or more heads comes up."
As mentioned before, there are 3 states for this one: HH, HT or TH. As there are four outcomes total, 3/4 outcomes are covered by this event. Since all of these outcomes have the same probability, the probability of this event is also 3/4.

b) You flip a coin 4 times, and are interested in the event "one or more heads comes up."
Again, as mentioned before, there are 15 states for this and 16 total combinations. Hence 15/16 outcomes are covered by this event. Again, all of the outcomes have the same probability so the probability of this event is 15/16.

c) You roll a 6-sided die 3 times, and are interested in the event "sum of the dice is 4 or less."
As just mentioned, there are 4 states to this: 1 + 1 + 1, 1 + 1 + 2, 1 + 2 + 1 and 2 + 1 + 1. There are 6^3 possible outcomes, so the fraction of outcomes here is 4/(6^3) = 4/216 = 1/54. Again, all of the outcomes have the same probability so the probability of this event is also 1/54.

d) You question 5 survey participants, and ask them whether they prefer coffee, tea or soft drinks, and are interested in the event of "3 or more of the participants prefer coffee."
From my answers to previous questions, there are 16 outcomes in which 3 or more participants prefer coffee, and 3^5 outcomes total. Hence 16/243 outcomes are covered by the event. It is not possible to estimate the probability here because the probability is not uniform. People are not equally likely to prefer coffee, tea or soft drinks.

5. The blood groups of 200 people are distributed as follows: 50 have type A blood, 65 have type B blood, 70 have type O blood, and 15 have type AB blood. If a person from this group is selected at random, what is the probability that this person has O blood type?

P(O blood type) = 70/200 = 35/100 = 0.35.

6. The number of adults living in homes on a randomly selected city block is described by the probability distribution shown in the following table. What is the probability that 4 or more adults reside at a randomly selected home?


Number of adults, x1234 or more
Probability, P(x)0.250.500.15???

Since the total probabilities always sum to 1, P(4 or more) = 1 - (0.25 + 0.50 + 0.15) = 0.1.

7. If the probability of an event is p = 0.1, why might we see the event 14% of the time, or maybe only 9% of the time, after a small number of draws?

There are two important concepts to understand here: the Law of Large Numbers and sampling error. The Law of Large Numbers states that in the short-term you cannot predict the outcome, but after repeated trials the probability of an event converges around its "true" probability. The other important concept to know about is sampling error. This basically states that if you randomly select one sample and test it, you may end up with a different result if you pick another random sample and test that. This is because the samples are small, so the probability of certain events in them are not going to necessarily converge around the "true" probability value.

8. In the region around the Chernobyl nuclear disaster, mutated plants occur at a higher rate than elsewhere. Only 2% of the "normal" wild-growing chamomile plants have orange flowers, with the other 98% being white, but in the radioactive zone around Chernobyl the rate is 15% orange and 85% white.
If the region downwind of Chernobyl is sampled for seeds, and 25% of seeds collected are known to be from the radioactive zone, what is the probability that the seed will have orange flowers?

The seed will have orange flowers if a) it is one of the 2% of orange plants from a normal area or b) it is one of the 15% of orange plants from the radioactive zone.
P(normal, orange) = (0.75)(0.02) = 0.015
P(radioactive, orange) = (0.25)(0.15) = 0.0375
P(orange) = 0.015 + 0.0375 = 0.0525

9. Evaluate the following n choose x values.

a) 4 choose 1
(4!)/(1!3!) = 4

b) 4 choose 3
(4!)/(3!1!) = 4

c) 5 choose 2
(5!)/(2!3!) = (20/2) = 10

d) 6 choose 2
(6!)/(2!4!) = (30/2) = 15

10. Calculate the given binomial probability, and state what each means in words.

a) b(1; 4, 0.3)
This is the probability of getting 1 success out of 4 trials, with a 0.3 probability of success.
The probability here is (4 choose 1)(0.3)^1(0.7)^3 = (4)(0.3)(0.49)(0.7) = (1.96)(0.21) = 0.4116

b) b(3; 4, 0.3)
This is the probability of getting 3 successes out of 4 trials, with a 0.3 probability of success.
The probability here is (4 choose 3)(0.3)^3(0.7)^1 = (4)(0.09)(0.3)(0.7) = (0.36)(0.21) = 0.0756

b) b(2; 5, 0.4)
This is the probability of getting 2 successes out of 5 trials, with a 0.4 probability of success.
The probability here is (5 choose 2)(0.4)^2(0.6)^3 = (10)(0.16)(0.216) = 0.3456

b) b(2; 6, 0.4)
This is the probability of getting 2 successes out of 6 trials, with a 0.4 probability of success.
The probability here is (6 choose 2)(0.4)^2(0.6)^4 = (15)(0.16)(0.6)^4 = 0.31104

11. Suppose that the probability that a baby is a boy is 0.5 (and likewise for a girl). Which gender distribution is more likely: Family A, with 7 girls out of 8 children, or Family B with four girls out of 8 children?

Without even evaluating it I can see that Family B is more likely. There are only 8 different ways in which there can be 7 girls: the boy can be child 1, 2, 3, 4, 5, 6, 7 or 8. There are many more ways in which there can be 4 girls. Since the probability of a boy or girl is even, Family B is more likely.

12. Suppose that the probability that a lottery scratch ticket is a winner is 0.15.

a) What is the probability that a person buying 5 tickets will have no winning tickets?
P(no wins) = (1 - 0.15)^5 = 0.4437

b) What is the probability that a person buying 5 tickets will have at least one winning ticket?
P(at least 1 win) = 1 - P(no wins)
P(at least 1 win) = 1 - 0.4437 = 0.5563

c) Is it more likely that a person buying 5 winners will have at least one winning ticket, or have no winning tickets?

Well, if they buy 5 winners, of course they have winning tickets!

Assuming they just meant "buying 5 tickets" though, as you can see from a) and b), it's more likely that they'll have at least one win than no wins.

d) What is the probability that a person buying 10 tickets will have at least one winning ticket?
P(at least 1 win) = 1 - P(no wins)
P(at least 1 win) = 1 - (1 - 0.15)^10 = 0.8031

13. Use the Binomial Distribution formula to compute the following probabilities:

a) The probability of 1 or more heads in 2 coin tosses.
P(1 or more heads) = 1 - P(no heads)
P(1 or more heads) = 1 - (2 choose 0)(0.5)^0(0.5)^2 = 0.75

b) The probability of 1 or more heads in 4 coin tosses.
P(1 or more heads) = 1 - P(no heads)
P(1 or more heads) = 1 - (4 choose 0)(0.5)^0(0.5)^4 = 0.9375

c) The probability of 3 or more coffee responses in a survey of 5 people's favourite drink, if 60% of people usually prefer coffee.
P(3 responses) = (5 choose 3)(0.6^3)(0.4^2) = 0.3456
P(4 responses) = (5 choose 4)(0.6^4)(0.4^1) = 0.2592
P(5 responses) = (5 choose 5)(0.6^5)(0.4^0) = 0.07776
P(3 or more) = 0.3456 + 0.2592 + 0.07776 = 0.68256

14. The probability that a student is accepted to a prestigious college is 0.3. If 5 friends apply, what is the probability that at most 2 are accepted?

P(0 acceptances) = (5 choose 0)(0.3^0)(0.7^5) = 0.16807
P(1 acceptance) = (5 choose 1)(0.3^1)(0.7^4) = 0.36015
P(2 acceptances) = (5 choose 2)(0.3^2)(0.7^3) = 0.3087
P(2 or fewer) = 0.16807 + 0.36015 + 0.3087 = 0.83692

There's a whole lot more questions on normal distributions, but since a lot of them are of the "shade the part of the graph" kind, I'm not going to post about them here. Plus I'm getting sore just from sitting on this chair. TTFN!

No comments:

Post a Comment