Events Decide which of the following statements are true?
(i) If and are exclusive events then so are and .
(ii) .
(iii) .
(A) TTT, (B) FFT, (C) FTF, (D) TFF, (E) FFF.
Vets An experiment is carried out where the next animal to be brought into a vet is observed. Suppose the sample space contains three outcomes, . Assuming satisfies axiom 3, decide whether the following are valid probabilities.
(i) .
(ii) , , .
(iii) , , .
(A) TTT, (B) TTF, (C) FTF, (D) FTT, (E) FFF.
Conditional probabilities Which of the following statements are true?
(a) If and are exclusive events then .
(b) If are events then .
(c) If are events then .
(A) TTT, (B) TTF, (C) TFT, (D) FTT, (E) FFF.
Vectorised command Assuming that x and y are vectors of the same length, consider the following code:
m <- rep(0,length(x))
for (i in 1:length(x)) {
m[i] <- max(x[i],y[i])
}
What operation will produce the same vector m without the need for a for loop?
m <- max(x,y)
m <- x*(x >=y) + y*(x<y)
m <- y*(x >=y) + x*(x<y)
m <- x*(max(x,y)==x) + y*(max(x,y)==y)
m <- x*(max(x,y)==x) + y*(max(x,y)!=x)
Recursion relationship II A sequence is defined by the inhomogeneous recursion relationship
where .
Adapt the recursion function to compute the first values of an inhomogeneous recursion relationship and hence find the value of for which (or very close to 0).
(A) , (B) , (C) , (D) , (E)