Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Jupyter notebook Assignment 1.ipynb

Project: Math 302
Views: 256
Kernel: Python 3 (Ubuntu Linux)

Peter McFetridge, 25480138

Jan 22, 2016

Math 302

1. Section 1.2 Exercise 6

For any iΩ={1,2,3,4,5,6}i \in \Omega = \{1,2,3,4,5,6\} there is a distribution function m(i)=Cim(i) = C \cdot i where CC the probability of side ii facing up, CC is proportional to the number of dots on side ii.

C=number  of  dots  on  side  itotal  number  of  dots  on  dieC = \frac{number \; of \; dots \; on \; side \; i}{total \; number \; of \; dots \; on \; die}

or

C=i21C = \frac{i}{21}

Let EE be the event that an even number is thrown. So, E={2,4,6}E = \{2,4,6\}

P(E)=221+421+621=1121P(E) = \frac{2}{21} + \frac{4}{21} + \frac{6}{21} = \mathbf{\frac{11}{21}}

2. Section 1.2 Exercise 7

Let A and B be events such that P(AB)=1/4P(A \cap B) = 1/4, P(A~)=1/3P(\tilde{A})=1/3, and P(B)=1/2P(B)= 1/2. What is P(AB)P (A \cup B)?

$$P(A) = 1 - P(\tilde{A})$ then P(A)=11/3=2/3P(A) = 1 - 1/3 = 2/3$

And P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)

Gives us

P(AB)=23+1214=1112P(A \cup B) = \frac{2}{3} + \frac{1}{2} - \frac{1}{4} = \mathbf{\frac{11}{12}}

3. Section 1.2 Exercise 10

In order for a bill to get to the president it must pass the House of Representatives and the Senate.

Let S=S = a bill passing the Senate

Let H=H = a bill passing the House of Representatives

The probability that a bill is passed throught the Senate is P(S)=.8P(S) = .8 and the probability that a bill is passed through the house is P(H)=.6P(H) = .6 and the probability that a bill is passed through at least one of the two is P(SH)=.9P(S \cup H) = .9

Since P(SH)=P(S)+P(H)P(SH)P(S \cup H) = P(S) + P(H) - P(S \cap H)

Then P(SH)=P(S)+P(H)P(SH)P(S \cap H) = P(S) + P(H) - P(S \cup H)

So, P(SH)=.8+.6.9=.5P(S \cap H) = .8 + .6 - .9 = \mathbf{.5}

4. Section 1.2 Exercise 11

What odds should a person give in favor of the following events?

(a) A card chosen at random from a 52 card deck is an ace.

EE = ace is drawn There are 4 aces in a 52 card deck P(E)=452=113P(E) = \frac{4}{52} = \mathbf{\frac{1}{13}}

(b) Two heads will turn up when a coin is tossed twice.

EE = coin toss comes up heads P(E)=12P(E) = \frac{1}{2} We want the probability that we will receive 2 heads or EEE \cdot E

Probability that two heads will turn up = EE=(12)2=14E \cdot E = \left({\frac{1}{2}}\right)^2 = \mathbf{\frac{1}{4}}

This can also so seen by looking at the total number of outcomes. In this case there are 4 total outcome. Ω={HH,  HT,  TH,  TT}\Omega = \{HH, \; HT, \; TH, \; TT\}

Only 1 of the 4 outcomes satisfies what we are looking for and therefore 14\mathbf{\frac{1}{4}}

(c) Two sixes will turn up when two dice are rolled.

Omega is the sample space of the results when a die is roll with an even distribution function. Ω={1,2,3,4,5,6}\Omega = \{1,2,3,4,5,6\} Event EE = 6 facing up when die is rolled. We are looking for the probability that both die are 6 P(E)P(E)=P(E2)=(16)2=136P(E) \cdot P(E) = P(E^2) = \left(\frac{1}{6}\right)^2 = \mathbf{\frac{1}{36}}

5. Section 1.2 Exercise 18

(a) For events A1,...,AnA_1,...,A_n, prove that

P(A1An)P(A1)++P(An).P(A_1 \cup \cdot\cdot\cdot \cup A_n) \leq P(A_1)+\cdot\cdot\cdot+P(A_n).

Let A1,...,AnA_1,...,A_n are events in the set Ω\Omega

P(i=1nAi)i=1nP(Ai)P \left( \bigcup_{i=1}^{n} A_i\right) \leq \sum_{i=1}^{n} P(A_i)

Since P(i=1nAi)P \left( \bigcup_{i=1}^{n} A_i\right) is the event that at least one event in AiA_i occurs and is bounded by Ω=1\Omega = 1 by Axiom 2. Regardless if the events are distinct or not distinct.

By Axiom 1 0P(Ai)1 0 \leq P(A_i) \leq 1 then it is easy to see that i=1nP(Ai)1\sum_{i=1}^{n} P(A_i) \geq 1 unless event A=A = \emptyset.

(b) For events A and B, prove that

P(AB)P(A)+P(B)1P(A \cap B) \geq P(A) + P(B) - 1

Let AA and BB be events in Ω\Omega

We can rearrange the problem 1P(A)+P(B)P(AB)1 \geq P(A) + P(B) - P(A \cap B) Which is equivalent to 1P(AB) 1 \geq P(A \cup B) Since P(AB)=ΩP(A \cup B) = \Omega we have 1Ω1 \geq \Omega Which is true by Axiom 2

6. Section 1.2 Exercise 18

If A,B,CA, B, C are any three events, show that P(ABC)=P(A)+P(B)+P(C)P(AB)P(BC)P(CA)+P(ABC)P(A \cup B \cup C) = P(A) + P(B) + P(C) - P(A \cap B) - P(B \cap C) - P(C \cap A) + P(A \cap B \cap C)

We can expand

P(ABC)=P[(AB)C]=P(AB)+P(C)P[(AB)C]By the  distributive law  P[(AB)C]=P(AC)(BC)  and so...=P(A)+P(B)P(AB)+P(C)P[(AC)(BC)]=P(A)+P(B)P(AB)+P(C)P(AC)P(BC)+P[(AB)(BC)]And by the  distributive law  P[(AB)P(BC)]=P(ABC)=P(A)+P(B)+P(C)P(AB)P(AC)P(BC)+P(ABC)\begin{aligned} P(A \cup B \cup C) & = P[(A \cup B) \cup C] \\ & = P(A \cup B) + P(C) - P[(A \cup B) \cap C] \\ & \text{By the} \; \textit{distributive law} \; P[(A \cup B) \cap C] = P(A \cap C) \cup (B \cap C)\; \text{and so...} \\ & = P(A) + P(B) - P(A \cap B) + P(C) - P[(A \cap C) \cup (B \cap C)] \\ & = P(A) + P(B) - P(A \cap B) + P(C) - P(A \cap C) - P(B \cap C) + P[(A \cap B) \cap (B \cap C)] \\ & \text{And by the} \; \textit{distributive law} \; P[(A \cap B) \cap P(B \cap C)] = P(A \cap B \cap C) \\ & = P(A) + P(B) + P(C) - P(A \cap B) - P(A \cap C) - P(B \cap C) + P(A \cap B \cap C) \\ \end{aligned}

7. Section 1.2 Exercise 20

Explain why it is not possible to define a uniform distribution function (see Definition 1.3) on a countably infinite sample space. Hint: Assume m(ω) = a for all ω, where 0 ≤ a ≤ 1. Does m(ω) have all the properties of a distribution function?

For Ω={1,2,3,.....}\Omega = \{1,2,3,.....\}

We can show that m(n)=12nm(n) = \frac{1}{2^n}

ωm(ω)=12+14+18+=1\sum_{\omega}m(\omega) = \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdot \cdot \cdot = 1

Which is true for the geometric sequence, 1+r+r2+r3+=11r1 + r +r^2 +r^3 + \cdot \cdot \cdot = \frac{1}{1-r} or r+r2+r3+r4+=r1rr+r^2+r^3+r^4+ \cdot \cdot \cdot = \frac{r}{1-r}

for 1<r<1-1 < r < 1

When r=.25r = .25 P(E)=.25.75=13P(E) = \frac{.25}{.75} = \frac{1}{3}

Which shows that P(E)=13P(E) = \frac{1}{3} and P(E~)=23P(\tilde{E}) = \frac{2}{3}

And that contradicts the properties of a uniform distribution.

8. Section 1.2 Exercise 26

Two cards are drawn from a deck of 52 cards. What is the probability that the second card is higher in rank than the first card. 1=P(Higher)+P(Lower)+P(Same) 1 = P(Higher) + P(Lower) + P(Same) \\ 0=1P(Higher)P(Lower)P(Same) 0 = 1 - P(Higher) - P(Lower) - P(Same) \\ Since  P(Higher)  and  P(Lower)  are the same we can re-write \text{Since} \; P(Higher) \; and \; P(Lower) \; \text{are the same we can re-write} \\ 2P(Higher)=1P(Same) 2P(Higher) = 1 - P(Same) \\ Since one card has been removedP(Same)=351 \text{Since one card has been removed} P(Same) = \frac{3}{51} \\ 2P(Higher)=1351 2P(Higher) = 1 - \frac{3}{51} \\ P(Higher)=48102=2451P(Higher) = \frac{48}{102} = \frac{24}{51} \\