In: Math
4. (a) In a fraud detection system a number of different algorithms are working indepen- dently to flag a fraudulent event. Each algorithm has probability 0.9 of correctly detecting such an event. The program director wants to be make sure the system can detect a fraud with high probability. You are tasked with finding out how many different algorithms need to be set up to detect a fraudulent event. Solve the following 3 problems and report to the director. [Total: 18 pts] (b) Suppose n is the number of algorithms set up. Derive an expression for the probability that a fraudulent event is detected. (6 pts) (c) Using R, draw a plot of the probability of a fraudulent event being detected versus n, varying n from 1 to 10. (6 pts) (d) Your colleague claims that if the company uses n = 4 algorithms, the probability of detecting the fraudulent event is 0.9999. The director is not convinced. Generate 1 million samples from Binomial distribution with n = 4, p = 0.90 and count the number of cases where Y = 0. Report the number to the director. (6 pts)
(b)
Probability that at least one of algorithm detects fraud = 1 - Probability that no algorithm detects fraud
= 1 - (1 - 0.9)n
= 1 - 0.1n
(c)
The plot of the probability of a fraudulent event being detected versus n is,
R Code:
> n = c(1:10)
> p = 1 - 0.1^n
> plot(n,p, pch = 16, col = "blue" , ylab ="probability of a
fraudulent event being detected")
(d)
For n = 4,
Probability of a fraudulent event being detected = 1 - 0.14 = 0.9999
R code to generate 1 million samples from Binomial distribution with n = 4, p = 0.90 and count the number of cases where Y = 0.
x = rbinom(n = 1000000, size = 4, prob = 0.9)
sum(x == 0)
On running the code, we get the number of cases where Y = 0 is 94. Note that we will be getting different numbers on running the code.
Proportion of cases where Y = 0 = 94/1000000 = 0.0000094
Proportion of cases where Y is not 0 (so that the fraud is detected) = 1 - 0.0000094 = 0.9999906