Presentation is loading. Please wait.

Presentation is loading. Please wait.

Psychology 202a Advanced Psychological Statistics September 24, 2015.

Similar presentations


Presentation on theme: "Psychology 202a Advanced Psychological Statistics September 24, 2015."— Presentation transcript:

1 Psychology 202a Advanced Psychological Statistics September 24, 2015

2 Plan for today Rules for probabilities of combined events Probability simulation in R Deriving Bayes' theorem. An example of Bayes' theorem. Sampling distributions. Introducing hypothesis testing through the binomial distribution.

3 The addition rule Used for combining events with an “OR” link. Simple form (requires mutually exclusive events): P(A or B) = P(A) + P(B) Examples: –P(a die comes up 1 OR 2) –P(spinner lands between 0 and ¼ OR between ½ and ¾) –P( N(0,1) 1.96)

4 The addition rule (cont.)‏ The more complex form: P(A or B) = P(A) + P(B) – P(A and B). Does not require mutual exclusivity. Examples: –P( 1 st coin toss is 'H' OR 2 nd coin toss is 'H') –P( 1 st IQ > 136 OR 2 nd IQ > 136) But there's a problem: how do we get P(A and B)?

5 The multiplication rule Used for combining events with an 'AND' link. Simple form (requires independent events): P(A and B) = P(A) P(B). Examples: –P( 1 st coin toss = 'H' AND 2 nd coin toss = 'H') –P( 1 st spin > ½ AND 2 nd spin < ¾ )

6 The multiplication rule (cont.)‏ The more complex form (does not require independence): –P(A and B) = P(A) P(B|A) or –P(A and B) = P(B) P(A|B) The vertical bar is read “given” and indicates conditional probability.

7 The addition rule, revisited. Examples: –P( 1 st coin toss is 'H' OR 2 nd coin toss is 'H') – ½ + ½ - (½ * ½) = ¾. –P( 1 st IQ > 136 OR 2 nd IQ > 136) –.00135 +.00135 -.00135*.00135 .0027.

8 Empirical validation of probability laws An interlude in R occurs here.

9 Bayes' theorem Bayes' theorem provides a way to reverse conditional probabilities: Equivalently,

10 Deriving Bayes’ theorem

11 Example of Bayes’ theorem Medical tests Usually, we are told the test’s sensitivity and its specificity. Let A denote “has earlobe cancer.” Let B denote “tests positive for earlobe cancer.” Sensitivity is Specificity is

12 Here’s a hypothetical table Has EC Does not have EC Tests positive 15419 Tests negative 214791481 1714831500

13 From that table, we can get: P(Have disease) = 17 / 1500 P(Test positive) = 19 / 1500 P(Have disease | test positive) = 15 / 19 P(Have disease | test negative) = 2 / 1481 P(Test positive | have disease) = 15 / 17 P(Test positive | no disease) = 4 / 1483

14 But a pharmaceutical company gives us: Sensitivity = 15 / 17 Specificity = 1479 / 1483 If we know the base rate (probability of having the disease), then we can use Bayes’ theorem to figure out P(disease | positive test). (worked out in R)


Download ppt "Psychology 202a Advanced Psychological Statistics September 24, 2015."

Similar presentations


Ads by Google