In: Math
Zhaoxin needs to successfully complete a coding project that involves complex natural language processing algorithms. Zhaoxin must choose between three different Application Programming Interfaces (API), but is unsure which API is best for the project. Being a Statistician, he decides to collect data, then use random chance to make the final decision. He assigns a probability of 0.45 for PyTorch, 0.25 for Keras, and the rest to TensorFlow. Each API affects Zhaoxin chances of completing the project on time. Zhaoxin will complete the project on-time with a 75% chance if he selects PyTorch, a 55% chance if he selects Keras, and only a 35% chance if he selects TensorFlow.
a) Draw a well-labeled tree diagram to illustrate the above information.
b) What is the probability that Zhaoxin is late and used the TensorFlow API?
c) What is the probability that Zhaoxin is on-time?
d) If Zhaoxin selects Keras as the API, what is the probability that he is on time with the project?
e) If Zhaoxin is late with the project, what is the probability that he selected PyTorch as the API?
f) Is choice of API and project completion independent? Support your answer mathematically.
Let py represent pytorch
Let k represent keras
let t represent tensor
Let o represent ontime
Let l represent late
P(py) = 0.45
P(k)= 0.25
P(t) = 0.30
Probrability of submitting the project on time given that it was
done using pytorch = P(o|py)=0.75
Probrability of submitting the project late given that it was done
using pytorch = P(l|py)=1-0.75 = 0.25
Probrability of submitting the project on time given that it was
done using keras = P(o|k)=0.55
Probrability of submitting the project late given that it was done
using keras = P(l|k)=1- 0.55= 0.45
Probrability of submitting the project on time given that it was
done using tensor = P(o|t)=0.35
Probrability of submitting the project late given that it was done
using tensor = P(l|t)=1-0.35 = 0.65
a) Draw a well-labeled tree diagram to illustrate the above
information
.
b) What is the probability that Zhaoxin is late and used the
TensorFlow API?
P(l|t)=1-0.35 = 0.65
c) What is the probability that Zhaoxin is on-time?
P(o) = P(o|py) p(py) + P(o|k) p(k) +P(o|t) p(t) = (0.75 *
0.45)+(0.55 * 0.25)+(0.30 * 0.35)=0.58
P(l) = 1- p(o)= 1-0.58= 0.42
d) If Zhaoxin selects Keras as the API, what is the probability
that he is on time with the project?
P(o|k)=0.55
e) If Zhaoxin is late with the project, what is the probability
that he selected PyTorch as the API?
P(py|l) = P(l|Py) *(P(py)/P(l))= (0.25*0.45)/(0.42)= 0.2678