Professional Documents
Culture Documents
DATAX222 Assignment 1
DATAX222 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) = 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.
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:
We are given:
P(C) = 0.30
P(T) = 0.15
P(C ∪ T) = 0.40
P(C|T) represents the conditional probability that a randomly chosen student likes coffee given that
they like tea.
We already calculated P(T ∩ C) in part (b) as 0.05, and P(T) is given as 0.15.
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
We need to find the probability that a randomly chosen student does NOT like milo (denoted by Mc)
and also likes tea.
P(T) = 0.15
P(M ∩ T) = 0.05
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:
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:
We already know:
P(B|R) = 0.7
P(B|R') = 0.2
P(R) = 0.30
P(R') = 0.70
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(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:
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
So, the derivative of 15p2(1 - p)4 with respect to p is -60p2(1 - p)3 + 30p(1 - p)4.
∫2 x 2
dx
0
∫ 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
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:
(A ∪ B) ∩ C = (A ∩ C) ∪ (B ∩ C)
(A ∩ C) ∩ (B ∩ C) is the same as A ∩ B ∩ C.
Therefore,