Sale!

cs237 probability in computing H4 Solved

Original price was: $40.00.Current price is: $35.00. $29.75

Category:

Description

5/5 - (1 vote)

problem 1. Let x be a number chosen uniformly at random from [0, 1]. Find the probability of each of the
following events:
(a) 0.4 < x < 0.72;
(b) 0.4 ≤ x < 0.72;
(c) x ∈ {0.1, 0.2, 0.5, 0.7};
(d) x is one of the values in the infinite list 0.1, 0.11, 0.111, 0.1111, . . . ;
(e) x is a rational number.

problem 2. Suppose we throw a dart at a square target 1 meter on each side, which has a bullseye in the
center of radius 0.1 meters. Assume that the dart lands on a point chosen uniformly at random from the
square target. Find the probability of each of the following events:
(a) The dart lands in the bullseye;
(b) The dart lands within 0.1 meter of an edge of the square target (i.e., the shortest distance from the
dart to the closest edge is ≤ 0.1);
(c) The dart lands within 0.1 meter of a corner of the square target (i.e., the distance from the dart to
the closest corner point is ≤ 0.1);
(d) The dart lands in the exact center of the square (equivalently, in the exact center of the bullseye).
problem 3 (Fun with Areas). Suppose we sample two numbers X and Y independently, each uniformly
from the interval [0, 1]. Note that this is equivalent to sampling a point uniformly at random from the unit
square [0, 1]
2

. Find the probability of the following:
(a) |X − 1
2
| ≤ 1
4
,
(b) |X − Y| < 1
2
,
(c) max{X,Y} < 1
2
,
(d) X
2 + Y
2 < 1
4
.
problem 4. Insomnia Cookies is running a special campaign where they give out free cookies. An eager
volunteer handed out 12 tickets to 12 BU students, and each ticket can be redeemed for a free cookie.
Suppose that Insomnia Cookies only baked 10 cookies and each of the 12 students shows up to redeem
their ticket with probability 0.85, independently of the other students. Find the probability that there is at
least one student who shows up to redeem their ticket but the cookies have already run out.

problem 5. Pooh’s Home Run Derby is a flash game supposedly made for children but notorious for its
extreme difficulty. The objective of each level is simply to score a certain amount of home runs within a
limited number of pitches. In the final level, you face Christopher Robin and must score at least 40 home
runs in 50 pitches. Suppose that through hours of practice, you are able to score a home run on one of
Christopher’s pitches with probability of 0.7. Assume each pitch is independent.

Calculate:
(a) The probability of winning in exactly 40 rounds
(b) The probability of winning in exactly 41 rounds
(c) The probability of winning in exactly 42 rounds
(d) The probability of winning (hint: generalize the previous results and express your answer as a
summation)

Let X be a random variable for the total number of pitches it takes to win (for the purpose of simplicity,
X may still map to a positive value greater than 50). Let W be a binary random variable returning 1 when
we win and 0 when we lose (in a 50 pitch game). Please frame your answers in terms of these variables
when applicable.

problem 6 (Programming exercises). Download the HW 4 Jupyter notebook (coming soon!). Complete
all the exercises in the notebook. Submit the Jupyter notebook with your solutions to the Homework 4
Programming assignment on Gradescope. Your submission should be a single .ipynb file.
H4-2