Exercise 1 with solutions PDF

Title Exercise 1 with solutions
Course Neuroinformatics
Institution Universität Osnabrück
Pages 3
File Size 80.5 KB
File Type PDF
Total Downloads 19
Total Views 133

Summary

Aufgabenzettel Woche 1 mit Lösungen...


Description

Neuroinformatics Exercise Fall 2016

Exercise E1

Name: Olivera Stojanovi´c, Pascal Nieters

Instructions: (20 points) Solve the following problems. Write clearly and use same symbols as used in the lecture. Add comments, explanations or questions to your solution if necessary. Add additional paper sheets if space on these exercise sheets is insufficient. Label the additional sheets with your name and matriculation number. Each exercise sheet has in total 20 standard credit points. However, on some sheets you might find problems that can give you extra points. Such a problem is marked with ADVANCED. At the end of the term the total sum of standard and extra points needs to be larger than 60% of all standard points to get admitted to the exam at the end of the term. The deadline for this exercise sheet is: 11.11.2016 (3pts )

1. A bag contains 15 balls distinguishable only by their colours; 10 are blue and 5 are red. You reach into the bag with both hands and pull out 2 balls (one with each hand) and record their colours.

3 pts

(a) What is the random phenomenon (in our case, random variable)? Solution: A random variable is (or rather the phenomena are) the colours of the two balls. (b) What is the sample space? Solution: The sample space is the set of all possible colours for the two balls, which is {(B, B), (B, R), (R, B ), (R, R)}

(c) Express the event that the ball in my left hand is red as a subset of the sample space. Solution: The event is the subset {(R, B), (R, R)}.

(4pts )

2. You want to know how probable it is for a non-Coxi to frequent your favourite bar, but you feel it would be awkward to walk around the Schloss and ask strangers where they spend their nights. So instead you decide to infer this using the sum and product rule of probability. A very representative inquiry among your Coxi-friends tells you that about 70% of all Coxis seem to frequent the bar. Since the bar is rather small, you know that in total (at most) 6% of all students frequent the bar. You checked on the universitys website and found there were a total of 468 Coxis enrolled at the University in 2013 out of a total of 11259 students. Numbers seem to be rising, so you assume that currently 7% of the students at the University of Osnabrueck are Coxis. (a) What’s the joint probability that a random student is a Coxi and frequents your favourite bar? Solution: (1pt) Let C denote whether someone is a Coxi (C) or not (¬C). Let B denote whether someone frequents your favourite bar (B) or not (¬B). We know P (C) = 0.07 and P (B|C) = 0.7. Thus the product rule tells us that P (B, C) = P (B|C)P (C) = 0.7· 0.07 = 0.049 ≈ 0.05. (b) What’s the joint probability that a random student is not a Coxi and frequents your favourite bar? Solution: (1pt) We know from the sum rule that P (B) = P (B, C) + P (B, ¬C) = 0.06. Thus P (B, ¬C) = P (B) − P (B, C) = 0.06 − 0.05 = 0.01. (c) What’s the conditional probability that, if they are not a Coxi, they frequent you favourite bar? Solution: (2pts) P (B|¬C) = PP(B,¬C) = (¬C)

P (B,¬C) 1−P (C)

=

0.01 0.93

≈ 0.01

4 pts

NI/E1 (4pts )

– Page 2 of 3 –

Name:

3. Suppose that we have three colored boxes r (red), b (blue) and g (green). Box r contains 3 apples, 4 oranges, and 3 limes, box b contains 1 apple, 1 orange, and 0 limes, and box g contains 3 apples, 3 oranges, and 4 limes. If a box is chosen at random with probabilities p(r) = 0.2, p(b) = 0.2, p(g ) = 0.6, and a piece of fruit is removed from the box (with equal probability of selecting any of the items in the box), then what is the probability of selecting an apple? (Use Bayesian equation for that)

4 pts

Solution: Express the conditional probabilities for each box color: 3 10 3 p(x = apple|y = green) = 10 1 p(x = apple|y = blue) = 2 p(x = apple|y = red ) =

Then use Bayes to compute the probability of x given the prior to sample each box: p(x = apple) = p(x = apple, Y ) = p(x = apple|Y )· p(Y ) With prior probabilities of p = 0.2 for red and blue and p = 0.6 for green we get: p(x = apple) = p(x = apple|red )p(red ) + p(x = apple|g reen)p(green) + p(x = apple|blue)p(blue) 34 1 3 3 = · 0.2 + · 0.6 + · 0.2 = 2 10 10 100

(2pts )

4. Two sisters claim that they can communicate telepathically. To test this assertion, you place the sisters in separate rooms and show sister A a series of cards. Each card is equally likely to depict either a circle or a star or a square. For each card presented to sister A, sister B writes down circle, or star or square, depending on what she believes sister A to be looking at. If ten cards are shown, what is the probability that sister B correctly matches at least one?

2 pts

Solution: We will calculate a probability under the assumption that the sisters are guessing. The probability of at least one correct match must be equal to one minus the probability of no correct matches. Let Fi be the event that the sisters fail to match for the ith card shown. The probability of no correct matches is P (F1 ∩ F2 ∩ ... ∩ F1 0), where P (Fi ) = 32 for each i. If we assume that successive attempts at matching cards are independent, we can multiply together the probabilities for these independent events, and so obtain:  10 = 0.0173. P (F1 ∩ F2 ∩ ... ∩ F1 0) = P (F1 )P (F2 )...P (F1 0) = 32 Hence the probability of at least one match is 1 − 0.0173 = 0.9827.

(7pts )

5. You have ten coins in a pocket. Nine of them are ordinary coins with equal chances of coming up head and tail when tossed and the tenth has two heads. (a) If you take one of the coins at random from your pocket, what is the probability that it is the coin with two heads? Solution: (1 pt) Denote by D the event that the coin is the one with two heads. 1 P (D) = . 10

7 pts

NI/E1

– Page 3 of 3 –

Name:

(b) If you toss the coin and it comes up heads, what is the probability that it is the coin with two heads? Solution: (4 pts) Denote by H the event that we get a head when we toss the coin. Then we want to find P (D|H ). By Bayes’ theorem, we have: P (D|H ) =

P (H|D)P (D) . P (H)

1 . Now, we need to think about H , getting a head, in terms We have P (H |D) = 1 and P (D) = 10 of getting a head with either a double headed or single headed coin. Using the idea of a partition:

P (H ) = P (H ∩ D) + P (H ∩ Dc ) = P (H |D)P (D) + P (H |Dc )P (Dc ) 11 1 9 1 = + · = 1· 2 10 10 20 Finally, here is another way of calculating P (H ): think of the bag as containing the possible tosses. As the bag contains 9 fair coins and one double-headed coin, it must contains 11 heads and 9 tails, 11 so that the probability of choosing a head is (11+9) = 11 . 20 To return to the original question, we now obtain the answer: 1 2 10 = . P (D|H ) = 2 11 11 (c) If you toss the coin one further time and it comes up tails, what is the probability that it is one of the nine ordinary coins? Solution: (2 pts) The probability is 1. If it comes up tails, it cant be the coin with two heads. Therefore, it must be one of the other nine....


Similar Free PDFs