For my Module 4 assignment, I worked on different probability problems and used R to help calculate some of the answers. The assignment focused on understanding basic probability, using Bayes’ Theorem, and using the dbinom() function.
For Table 1, the total number of outcomes is 90. The probability of Event A is 30/90, which equals 0.3333.
The probability of Event B is also 30/90, which equals 0.3333.
For Event A or B, the answer is 50/90, or about 0.5556.
P(A or B) = P(A) + P(B) The correct formula must subtract P (A and B) so that the overlapping part is not counted twice.
0.3333 + 0.3333 − 0.1111 = 0.5555
For Part B, I worked with the example about Jane’s outdoor wedding and the probability of rain. The desert only receives rain about 5 days out of the year, while the weatherman predicts rain when it is raining 90% of the time. However, he also predicts rain 10% of the time when it does not actually rain. Even though the weatherman predicts rain correctly 90% of the time when it rains, rain is still pretty uncommon in the desert, since it only rains about 5 days out of 365
For part C, I used the dbinom() in R. The problem says that the traditional method has a 20% chance of causing complication. This means there is an 80% chance that a patient will not have a complication.
I needed to find the probability of successfully operating on all 10 patients without complications. I entered the following code into R:
dbinom(10, size=10, prob=0.8)
The result was:
0.1073742
This means there is about 10.74% probability that all 10 patients would successfully have no complications using the traditional method.
Overall, this assignment helped me understand probability in a few different ways. Part A helped me work with basic probabilities part B showed me how Bayes’ Theorem can be used and part C gave me more practice dbinom () function to calculate probability in R
Leave a comment