text: # Math 225
  
  ## Introduction to Biostatistics
  
  ### Highlights from Lecture #5
  
  In this lecture I solved several probability problems, some in multiple ways.
  
  ### Chapter 3
  
  ##### Rabbit problems
  1. A box contains six rabbits, one of which has been inoculated and five of which have not. If one rabbit is sampled, what is the chance that it has been inoculated?
  
  Solution: 1/6.
  
  2. A box contains six rabbits, two of which have been inoculated and four of which have not. If two rabbits are sampled at random, what is the probability that both are inoculated?
  
  Solution using events:
  
  ```P(both are inoculated)
  = P(1st in inoculated and 2nd is inoculated)
  = P(1st is inoculated) P(2nd is inoculated | 1st is inoculated)
  = (2/6) * (1/5) = 2/30 = 1/15.
  ```
  
  Solution using combinations:
  
  We must choose two of two inoculated rabbits and zero of four rabbits that have not been inoculated.
  
  P(both are inoculated) = 2C2 * 4C0 / 6C2
  
  = (2!/(2!0!)) * (4!/(0!4!)) / (6!/(2!4!)) = 1/15.
  
  Solution using permutations:
  
  With permutations we consider the order in which the rabbits are selected.
  
  P(both are inoculated) = 2P2 / 6P2
  
  = (2*1) / (6*2) = 1/15.
  
  3. ##### Sensitivity and Specificity (and related definitions)
  
  Consider a two by two table which partitions individuals by a positive or negative screening and presence or absence of a disease.
  
  ```                    | disease (D) | no disease (~D) | total
  -----------------------------------------------------------
  positive screen (S) |      a      |      b          | a+b
  negative screen (~S)|      c      |      d          | c+d
  -----------------------------------------------------------
  total               |     a+c     |     b+d         | a+b+c+d = N
  ```
  
  We define the following terms.
  
  prevalence rate = (a+c)/N = P(D).
  sensitivity = a/(a+c) = P(S|D).
  specificity = d/(b+d) = P(~S|~D).
  false positive rate = b/(b+d) = P(S|~D).
  false negative rate = c/(a+c) = P(~S|D).
  predictive value = a/(a+b) = P(D|S).
  
  Notice that teh false positive rate is 1 - specificity and the false negative rate is 1 - sensitivity.
  
  Bayes' rule is useful for finding the predictive value or yield.
  
  4. Suppose that P(D) = 0.01, P(S|D) = 0.95, and P(~S|~D) = 0.97. What is the predictive value, or P(D|S)?
  
  Solution:
  
  ```              S  0.0095
  /
  0.95/
  /
  D <
  /   \
  / 0.05\
  0.01/       \
  /         ~S 0.0005
  /
  \
  \          S 0.0297
  0.99\        /
  \  0.03/
  \    /
  ~D <
  \
  0.97\
  \
  ~S 0.9603
  
  ```
  
  Thus, P(D|S) = P(D and S) / P(S) = 0.0095 / (0.0095 + 0.0297) = 0.242.
  
  A positive screen (or presence of a symptom) increases the risk of disease from 1% to over 24%. However, it is still true that about three of every four posaitive screens are false, because the disease incidence is so low.
  
  Last modified: January 25, 2001
  
  Bret Larget, larget@mathcs.duq.edu
metadata: {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}