# BIO 230 Probability Theory and Applications HW I

Author

Lana N A

Last Updated

9 yıl önce

License

Creative Commons CC BY 4.0

Abstract

This is only a homework draft

Author

Lana N A

Last Updated

9 yıl önce

License

Creative Commons CC BY 4.0

Abstract

This is only a homework draft

```
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\title{BIO 230 Probability Theory and Applications HW I}
\author{Lana Awad}
\date{\today}
\begin{document}
\maketitle
\section{Success Rate of Hospital I}
Probability of success at a given hospital is the probability of succes of treatment A or of treatment B. Since success of each treatment is gender dependent, the success rate of a treatment is further broken down to success of treatment given female or male. Let $S$ represent success, $A$ repreent assignment to treatment A, $B$ represent assignement to treatment B, $F$ represent patient is female, and $M$ represent patient is male. $\Pr(A) = \Pr(B) = 0.5$ since the treatment group is chosen randomly as A or B.
\begin{align*}
& \Pr(S) = \Pr(S|A\cup B) \\
& \Pr(S) = \Pr(S|A)\Pr(A) + \Pr(S|B)\Pr(B) \\
& \Pr(S) = \Pr(S|A\cap M)\Pr(A)\Pr(M) + \Pr(S|A\cap F)\Pr(A)\Pr(F) \\
& +\Pr(S|B\cap M)\Pr(B)\Pr(M) + \Pr(S|B\cap F)\Pr(B)\Pr(F)\\
& \Pr(S) = (0.4*0.5*0.5) + (0.7*0.5*0.5) + (0.6*0.5*0.5) + (0.3*0.5*0.5)\\
& \Pr(S) = 0.5
\end{align*}
Simulating this process using R results in \textbf{50, 485, 4960} success for a sample size of 100, 1000 and 10000 iterations respectively. So success rates are \textbf{0.5, 0.485, 0.4960}. To get accurate estimates of these rates, iterations of the sampling process should be done. For example 100 iterations give 0.4916, 0.5003 and 0.4998 as success rates.
\section{Success Rate of Hospital II}
Following the same logic for hospital II also results in success rate of 0.5. Simulating this process using R results in \textbf{49, 504, 4976} success for a sample size of 100, 1000 and 10000 respectively. So success rates are \textbf{0.49, 0.504, 0.4976}. Performing 100 iterations gives 0.4940, 0.5011 and 0.4992 as success rates.
\section{Given Population Distrubution what is the Probability Patient was in Hospital I knowing they were a success?}
By observing the success rates in the individual hospitals above, we can induce that the success rate at any given hospital is actually gender neutral. Hence, the information we were given about the distribution of the population by gender is not useful in answering this question. A successful case is equally likely to arise from treatment in hospital I or II. So the probability of this success being from hospital I is 0.5 in both cases.
Using R to simulate this, we also get that the probabilities of a successful case arising from hospital I are 0.4961, 0.5104 and 0.4991 for a sample size of 100, 1000 and 1000.
\end{document}
```

We only use cookies for essential purposes and to improve your experience on our site. You can find out more in our cookie policy.