Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

DATAX222-23B Assignment 1

Jasmyne Speake
Student ID: 1289517
1. State the three axioms of probability. [4 marks]

1. P(A) ≥ 0, for all events A – this means for any event where A occurs, the probability of A is
greater or equal to 0.

2. P(Ω) = 1

3. (Countable additivity). For an infinite sequence of mutually exclusive events {A1, A2, A3, ..}

P ( ¿ i=1¿∞ Ai ) = ∑ P( Ai)
i=1

2. Suppose events A, B ⊆ Ω, P(A) = 0.5, P(B) = 0.2, and P(A ∩ B) = 0.3. Are A and B independent
events? Explain why or why not. [2 marks]

To determine whether events A and B are independent, we need to check if the following condition
holds:

P(A ∩ B) = P(A) * P(B)

Given the information provided:

P(A) = 0.5 (the probability of event A occurring)

P(B) = 0.2 (the probability of event B occurring)

P(A ∩ B) = 0.3 (the probability of both event A and event B occurring)

P(A) * P(B) = 0.5 * 0.2 = 0.1

P(A ∩ B) = 0.3

Since P(A ∩ B) ≠ P(A) * P(B), the events A and B are NOT independent.

In conclusion, events A and B are dependent because the probability of their intersection is not
equal.
3. In DATAX222, 30% of students like coffee, 20% like milo, and 15% like tea. Furthermore, 40% of
students like coffee or tea or both. In contrast, 5% of students like milo and tea, and 8% of students
like coffee and milo.

Suppose that all students are equally likely to be chosen. Hence let C be the event that a randomly
chosen student likes coffee, M be the event that a randomly chosen student likes milo, and T be the
event that a randomly chosen student likes tea.

(b) Calculate P(T ∩ C). [2 marks]

P(T ∩ C) represents the probability that a randomly chosen student likes both tea and coffee.

We can calculate this using the formula for the intersection of two events:

P(T ∩ C) = P(T) + P(C) - P(T ∪ C)

We are given:

P(C) = 0.30

P(T) = 0.15

P(C ∪ T) = 0.40

P(T ∩ C) = 0.15 + 0.30 - 0.40 = 0.05

(c) Calculate P(C|T). [2 marks]

P(C|T) represents the conditional probability that a randomly chosen student likes coffee given that
they like tea.

We can calculate this using the conditional probability formula:

P(C|T) = P(T ∩ C) / P(T)

We already calculated P(T ∩ C) in part (b) as 0.05, and P(T) is given as 0.15.

P(C|T) = 0.05 / 0.15 = 1/3 ≈ 0.3333

(d) Calculate P(Mc). [2 marks]

P(Mc) represents the probability that a randomly chosen student does NOT like milo.
We can calculate this using the complement rule:

P(Mc) = 1 - P(M)

P(M) = 0.20

P(Mc) = 1 - 0.20 = 0.80

(e) Calculate P(Mc ∩ T). [2 marks]

We need to find the probability that a randomly chosen student does NOT like milo (denoted by Mc)
and also likes tea.

We can use the formula for the intersection of two events:

P(Mc ∩ T) = P(T) - P(M ∩ T)

P(T) = 0.15

P(M ∩ T) = 0.05

P(Mc ∩ T) = 0.15 - 0.05 = 0.10

4. State the law of total probability. Make sure you include the assumptions. [2 marks]

The law of total probability is a fundamental rule relating marginal probabilities to conditional
probabilities. It expresses the total probability of an outcome which can be realized via several
distinct events. The formula for the law of total probability is:

P(A) = P(A|B1)P(B1) + P(A|B2)P(B2) + … + P(A|Bn)P(Bn)

where A is the event whose probability is to be calculated, and B1, B2, …, Bn are mutually exclusive
events that cover all possible outcomes. The assumptions for the law of total probability are that the
events B1, B2, …, Bn are mutually exclusive and exhaustive (i.e., they cover all possible outcomes),
and that the conditional probabilities P(A|B1), P(A|B2), …, P(A|Bn) are known.

5. Jeff bases his choice of clothes upon the weather forecast. If it is predicted to rain, there is a 0.7
probability he will wear his blue suit, otherwise he will wear his grey suit. If it is not predicted to rain,
then there is a 0.2 probability he will wear his blue suit, otherwise he will wear his grey suit. Lastly, it
is predicted to rain on 30% of days.
Hence let R be the event that it is predicted to rain and B be the event that Jeff will wear his blue
suit.

(a) Write down at least four pieces of information on the probabilities given above. [2 marks]

1. P(B|R) = 0.7: The probability that Jeff will wear his blue suit given that it is predicted to rain is
0.7.
2. P(B|R') = 0.2: The probability that Jeff will wear his blue suit given that it is not predicted to
rain is 0.2.
3. P(R) = 0.30: The probability that it is predicted to rain on a given day is 0.30.
4. P(R') = 1 - P(R) = 0.70: The probability that it is not predicted to rain on a given day is 0.70.

(b) What is the probability that Jeff will wear a blue suit on a given day? [3 marks]

To find the probability that Jeff will wear a blue suit on a given day (P(B)), we can use the law of total
probability:

P(B) = P(B|R) * P(R) + P(B|R') * P(R')

We already know:

P(B|R) = 0.7

P(B|R') = 0.2

P(R) = 0.30

P(R') = 0.70

Now, let's calculate P(B):

P(B) = 0.7 * 0.30 + 0.2 * 0.70

P(B) = 0.21 + 0.14

P(B) = 0.35

The probability that Jeff will wear a blue suit on a given day is 0.35.

(c) If Jeff is wearing a grey suit, what is the probability that the weather forecast was for rain? [3
marks]

To find the probability that the weather forecast was for rain (P(R|G)), given that Jeff is wearing a
grey suit (G), we can use Bayes' theorem:
P(R|G) = (P(G|R) * P(R)) / P(G)

We need to find P(G), which is the probability that Jeff will wear a grey suit on a given day. Since
there are only two options (blue or grey), we can use the complement rule:

P(G) = 1 - P(B)

We already know P(R) = 0.30, and we can find P(G|R) from the information given in part (a):

P(G|R) = 1 - P(B|R) = 1 - 0.7 = 0.3

Now, let's calculate P(G):

P(G) = 1 - P(B) = 1 - 0.35 = 0.65

Now, we can find P(R|G):

P(R|G) = (P(G|R) * P(R)) / P(G)

P(R|G) = (0.3 * 0.30) / 0.65

P(R|G) = 0.09 / 0.65

P(R|G) ≈ 0.1385

The probability that the weather forecast was for rain, given that Jeff is wearing a grey suit, is
approximately 0.1385 or 13.85%.

6. (a) Use the product rule to differentiate 15p2(1 − p)4 with respect to p. [4 marks]

To differentiate the expression 15p2(1 - p)4 with respect to p using the product rule, we first need to
identify the two functions being multiplied together:

Function y = 15p2

Function t = (1 - p)4

The product rule states that the derivative of the product of two functions is given by:

(d/dp)(yt) = y(dt/dp) + t(dy/dp)

Now, let's find the derivatives of u and v with respect to p:

dy/dt = d/dp(15p2) = 2 * 15p(2-1) = 30p


To find dt/dp, we need to use the chain rule since v is a composite function with the outer function
being (1 - p)4 and the inner function being (1 - p):

dt/dp = d/dp((1 - p)4) = 4(1 - p)(4-1) * d/dp(1 - p) = 4(1 - p)3 * (-1) = -4(1 - p)3

Now, applying the product rule:

(d/dp)(15p2(1 - p)4) = y(dt/dp) + t(dy/dp)

= 15p2 * (-4)(1 - p)3 + (1 - p)4 * 30p

= -60p2(1 - p)3 + 30p(1 - p)4

So, the derivative of 15p2(1 - p)4 with respect to p is -60p2(1 - p)3 + 30p(1 - p)4.

(b) Calculate below

∫2 x 2
dx
0

Add 1 to the exponent and divide by the new exponent:

∫ 2x2 dx = (2/3)x3 + C

∫2 x 2
dx = [(2/3)(3)3] - [(2/3)(0)3]
0

= [(2/3)(27)] - [(2/3)(0)]

= (2/3)(27)

= 54/3

= 18

7. Suppose events A, B, C ⊆ Ω. Show that

P(A ∪ B ∪ C) = P(A) + P(B) + P(C) − P(A ∩ B) − P(A ∩ C) − P(B ∩ C) + P(A ∩ B ∩ C).

Hint: Set D = A ∪ B. [6 marks]

To prove the given statement, we will use the concept of the inclusion-exclusion principle.

Let D = A ∪ B.
The inclusion-exclusion principle states that for any three events A, B, and C, the probability of their
union is given by:

P(A ∪ B ∪ C) = P(D ∪ C) = P(D) + P(C) - P(D ∩ C)

P(D) = P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

P(A ∪ B ∪ C) = P(D ∪ C) = P(A ∪ B) + P(C) - P((A ∪ B) ∩ C)

P(A ∪ B ∪ C) = P(A ∪ B) + P(C) - P((A ∪ B) ∩ C)

= (P(A) + P(B) - P(A ∩ B)) + P(C) - P((A ∪ B) ∩ C)

To calculate P((A ∪ B) ∩ C), we can use the set identity:

(A ∪ B) ∩ C = (A ∩ C) ∪ (B ∩ C)

P((A ∪ B) ∩ C) = P((A ∩ C) ∪ (B ∩ C))

Now apply inclusion-exclusion principle for events A ∩ C and B ∩ C:

P((A ∪ B) ∩ C) = P(A ∩ C) + P(B ∩ C) - P((A ∩ C) ∩ (B ∩ C))

(A ∩ C) ∩ (B ∩ C) is the same as A ∩ B ∩ C.

Therefore,

P((A ∪ B) ∩ C) = P(A ∩ C) + P(B ∩ C) - P(A ∩ B ∩ C)

Now put it all together,

P(A ∪ B ∪ C) = (P(A) + P(B) - P(A ∩ B)) + P(C) - P((A ∪ B) ∩ C)

= P(A) + P(B) + P(C) - P(A ∩ B) - (P(A ∩ C) + P(B ∩ C) - P(A ∩ B ∩ C))

= P(A) + P(B) + P(C) - P(A ∩ B) - P(A ∩ C) - P(B ∩ C) + P(A ∩ B ∩ C)

Therefore, I have shown that;

P(A ∪ B ∪ C) = P(A) + P(B) + P(C) - P(A ∩ B) - P(A ∩ C) - P(B ∩ C) + P(A ∩ B ∩ C)

You might also like