SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Stat310          Estimation + Testing


                             Hadley Wickham
Saturday, 11 April 2009
1. What makes a good estimator?
                 2. Recap & general strategy
                 3. Non-symmetric distributions
                 4. Testing




Saturday, 11 April 2009
Low bias, low variance    Low bias, high variance




                High bias, low variance   High bias, high variance




Saturday, 11 April 2009
Can combine both
   together to get mean
   squared error


             ˆ = E[(θ − θ)2 ]
                    ˆ
         MSE(θ)
             ˆ = Var(θ) + Bias(θ, θ)2
                     ˆ         ˆ
         MSE(θ)


Saturday, 11 April 2009
Recap
                     (Z + 1)/5 ~ SomeDistribution(θ, β)
                     What, mathematically, is a 95%
                     confidence interval around Z?
                     Write down the steps you’d take to
                     generate such an interval if you knew θ
                     and β



Saturday, 11 April 2009
Problem

                     Y = g(X) Y ~ F(θ) (g has an inverse)
                     Find a 1 - α confidence interval for X.


                     i.e. Find a and b so that
                       P(a < X < b) = 1 - α



Saturday, 11 April 2009
Solution
                     1. Find a 1 - α confidence interval for Y.
                        P(c < Y < d) = 1 - α
                          a. If F is symmetric, then the bounds will
                                       -1(α/2) and d = F-1(1 - α/2)
                             be c = F
                          b. If F isn’t symmetric then it’s harder
                     2. a =    g -1(c),   b=   g -1(d)




Saturday, 11 April 2009
Example
                     340 333 334 332 333 336 350 348 331
                     344 (mean: 338, sd: 7.01)
                     Find a 95% confidence interval for μ

                            ¯n − µ
                            X
                              √ ∼ tn−1
                            s/ n
Saturday, 11 April 2009
Saturday, 11 April 2009
More complicated case

          (n − 1)S                    2
                                           X ∼ χ (n − 1)
                                                     2
       X=      2
             σ
                     Find 95% confidence interval for standard
                     deviation in previous case
                     (sd = 7.01, n = 10)


Saturday, 11 April 2009
Standard deviation

                     Find confidence interval for X ~ χ2(9).
                     Generally want the shortest confidence
                     interval, but hard to find when not
                     symmetric.
                     Any of the following are correct. The best
                     has the smallest interval.



Saturday, 11 April 2009
0.10




   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25   30

Saturday, 11 April 2009
0.10
                                                    (0.05, 1)
                                                   (3.33,Inf)
                                                  Length: Inf
   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25             30

Saturday, 11 April 2009
0.10
                                               (0.03, 0.99)
                                              (2.85,21.67)
                                              Length: 18.8
   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25           30

Saturday, 11 April 2009
0.10
                                             (0.025, 0.975)
                                                 (2.7,19.0)
                                               Length: 16.3
   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25           30

Saturday, 11 April 2009
0.10
                                               (0.01, 0.96)
                                              (2.09,17.61)
                                              Length: 15.5
   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25           30

Saturday, 11 April 2009
0.10
                                                 (0, 0.95)
                                                (0.0,16.9)
                                              Length: 16.9
   0.08




   0.06




   0.04




   0.02




   0.00

                  0       5   10   15   20   25          30

Saturday, 11 April 2009
Your turn
                     Find 95% confidence interval for the
                     standard deviation (sd = 7.01, n = 10)

                     P(2.09 < X < 17.61) = 0.95

                             (n − 1)S            2
                          X=      2
                                σ
Saturday, 11 April 2009
Testing



Saturday, 11 April 2009
Testing

                     Very closely related to estimation
                     (particularly confidence intervals)
                     But point is to answer a yes/no question:
                     Is the mean of the distribution equal to 0?
                     Do X and Y have the same mean?



Saturday, 11 April 2009
Your turn
                     The following values have been drawn
                     from a normal distribution with standard
                     deviation 1.
                     2.9 2.1 3.0 3.2 1.2 3.0 3.3 1.2 2.3 1.5
                     (mean: 2.13)
                     Is it possible they came from a normal
                     distribution with mean 1.5?


Saturday, 11 April 2009
Example
                     Create 95% confidence interval.
                     Is it inside?
                     Create 90% confidence interval.
                     Is it inside?
                     …
                     Or we can look up the value directly,
                     using the cdf


Saturday, 11 April 2009
Testing jargon
                     No: Null hypothesis. Nothing is
                     happening. (Thing we want to disprove)
                     Yes: Alternative hypothesis. Something
                     interesting is happening.


                     Major complication:


Saturday, 11 April 2009
Absence of
     evidence is not
  evidence of absence

Saturday, 11 April 2009
Implication

                     Means we never “accept” the null
                     hypothesis, just “fail to reject” it.


                     Null distribution is usually simple case for
                     which we know the distribution



Saturday, 11 April 2009
Your turn
                     Null hypothesis: μ = 1.5
                     Alternative hypothesis: μ > 1.5 OR μ < 1.5
                     Under the null hypothesis what is the
                     distribution of the mean?
                     How does what we saw compare to the
                     null distribution? Is it likely or not?


Saturday, 11 April 2009
P-value
                     P value gives us the probability, under the
                     null hypothesis, that we would have seen a
                     value equal to or more extreme than the
                     value we observed.
                     Strength of evidence for rejecting the null
                     hypothesis.
                     But we need a cut off to make a yes-no
                     decision. How do we choose that cut off?


Saturday, 11 April 2009
Errors
                     What are the possible errors we can
                     make?
                     False positive. Choose alternative when
                     null is correct. (aka Type 1)
                     False negative. Choose null when
                     alternative is true. (aka Type 2)



Saturday, 11 April 2009
Terminology
                     Probability of a false positive called α
                     Probability of false negative called 1 - β


                     How are the two related?
                     Usually care more about false positives



Saturday, 11 April 2009
Testing overview

                     Write down null and alternative
                     hypotheses.
                     Compute test statistic.
                     Convert to p-value.
                     Compare p-value to alpha cut off.



Saturday, 11 April 2009
Next time

                     Some specific tests.
                     i.e. for common situations what is the
                     distribution under the null-hypothesis




Saturday, 11 April 2009

Mais conteúdo relacionado

Destaque

佛說阿彌陀經經義略說
佛說阿彌陀經經義略說佛說阿彌陀經經義略說
佛說阿彌陀經經義略說lyquochoang
 
BST brochure
BST brochureBST brochure
BST brochureAstridvB
 
Evaluation activity 5
Evaluation activity 5Evaluation activity 5
Evaluation activity 5lmelvillexo
 
Sql常见面试题
Sql常见面试题Sql常见面试题
Sql常见面试题yiditushe
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Employement task 1
Employement task 1Employement task 1
Employement task 1Paigeward96
 
Dealing With Decisions
Dealing With DecisionsDealing With Decisions
Dealing With DecisionsMichael Smith
 
Lesson 8 presentation
Lesson 8 presentationLesson 8 presentation
Lesson 8 presentationmariamunoz031
 
洛克塔 Vis
洛克塔 Vis洛克塔 Vis
洛克塔 Viszust
 
The Game-Evaluation Part One
The Game-Evaluation Part OneThe Game-Evaluation Part One
The Game-Evaluation Part One06spuffarda
 
放生感應奇蹟記
放生感應奇蹟記放生感應奇蹟記
放生感應奇蹟記lyquochoang
 

Destaque (17)

佛說阿彌陀經經義略說
佛說阿彌陀經經義略說佛說阿彌陀經經義略說
佛說阿彌陀經經義略說
 
BST brochure
BST brochureBST brochure
BST brochure
 
Conoscenza e PA
Conoscenza e PAConoscenza e PA
Conoscenza e PA
 
Evaluation activity 5
Evaluation activity 5Evaluation activity 5
Evaluation activity 5
 
Sql常见面试题
Sql常见面试题Sql常见面试题
Sql常见面试题
 
Excel charts
Excel chartsExcel charts
Excel charts
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Employement task 1
Employement task 1Employement task 1
Employement task 1
 
Excel charts kz
Excel charts kzExcel charts kz
Excel charts kz
 
Dealing With Decisions
Dealing With DecisionsDealing With Decisions
Dealing With Decisions
 
Sura fatiha
Sura fatihaSura fatiha
Sura fatiha
 
Lesson 8 presentation
Lesson 8 presentationLesson 8 presentation
Lesson 8 presentation
 
洛克塔 Vis
洛克塔 Vis洛克塔 Vis
洛克塔 Vis
 
The Game-Evaluation Part One
The Game-Evaluation Part OneThe Game-Evaluation Part One
The Game-Evaluation Part One
 
Page2011
Page2011Page2011
Page2011
 
Kb 5 modul 2 kdm ii
Kb 5 modul 2 kdm iiKb 5 modul 2 kdm ii
Kb 5 modul 2 kdm ii
 
放生感應奇蹟記
放生感應奇蹟記放生感應奇蹟記
放生感應奇蹟記
 

Mais de Hadley Wickham (20)

27 development
27 development27 development
27 development
 
27 development
27 development27 development
27 development
 
24 modelling
24 modelling24 modelling
24 modelling
 
23 data-structures
23 data-structures23 data-structures
23 data-structures
 
Graphical inference
Graphical inferenceGraphical inference
Graphical inference
 
R packages
R packagesR packages
R packages
 
22 spam
22 spam22 spam
22 spam
 
21 spam
21 spam21 spam
21 spam
 
20 date-times
20 date-times20 date-times
20 date-times
 
19 tables
19 tables19 tables
19 tables
 
18 cleaning
18 cleaning18 cleaning
18 cleaning
 
17 polishing
17 polishing17 polishing
17 polishing
 
16 critique
16 critique16 critique
16 critique
 
15 time-space
15 time-space15 time-space
15 time-space
 
14 case-study
14 case-study14 case-study
14 case-study
 
13 case-study
13 case-study13 case-study
13 case-study
 
12 adv-manip
12 adv-manip12 adv-manip
12 adv-manip
 
11 adv-manip
11 adv-manip11 adv-manip
11 adv-manip
 
11 adv-manip
11 adv-manip11 adv-manip
11 adv-manip
 
10 simulation
10 simulation10 simulation
10 simulation
 

Último

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingSelcen Ozturkcan
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Último (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

24 Est Testing

  • 1. Stat310 Estimation + Testing Hadley Wickham Saturday, 11 April 2009
  • 2. 1. What makes a good estimator? 2. Recap & general strategy 3. Non-symmetric distributions 4. Testing Saturday, 11 April 2009
  • 3. Low bias, low variance Low bias, high variance High bias, low variance High bias, high variance Saturday, 11 April 2009
  • 4. Can combine both together to get mean squared error ˆ = E[(θ − θ)2 ] ˆ MSE(θ) ˆ = Var(θ) + Bias(θ, θ)2 ˆ ˆ MSE(θ) Saturday, 11 April 2009
  • 5. Recap (Z + 1)/5 ~ SomeDistribution(θ, β) What, mathematically, is a 95% confidence interval around Z? Write down the steps you’d take to generate such an interval if you knew θ and β Saturday, 11 April 2009
  • 6. Problem Y = g(X) Y ~ F(θ) (g has an inverse) Find a 1 - α confidence interval for X. i.e. Find a and b so that P(a < X < b) = 1 - α Saturday, 11 April 2009
  • 7. Solution 1. Find a 1 - α confidence interval for Y. P(c < Y < d) = 1 - α a. If F is symmetric, then the bounds will -1(α/2) and d = F-1(1 - α/2) be c = F b. If F isn’t symmetric then it’s harder 2. a = g -1(c), b= g -1(d) Saturday, 11 April 2009
  • 8. Example 340 333 334 332 333 336 350 348 331 344 (mean: 338, sd: 7.01) Find a 95% confidence interval for μ ¯n − µ X √ ∼ tn−1 s/ n Saturday, 11 April 2009
  • 10. More complicated case (n − 1)S 2 X ∼ χ (n − 1) 2 X= 2 σ Find 95% confidence interval for standard deviation in previous case (sd = 7.01, n = 10) Saturday, 11 April 2009
  • 11. Standard deviation Find confidence interval for X ~ χ2(9). Generally want the shortest confidence interval, but hard to find when not symmetric. Any of the following are correct. The best has the smallest interval. Saturday, 11 April 2009
  • 12. 0.10 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 13. 0.10 (0.05, 1) (3.33,Inf) Length: Inf 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 14. 0.10 (0.03, 0.99) (2.85,21.67) Length: 18.8 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 15. 0.10 (0.025, 0.975) (2.7,19.0) Length: 16.3 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 16. 0.10 (0.01, 0.96) (2.09,17.61) Length: 15.5 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 17. 0.10 (0, 0.95) (0.0,16.9) Length: 16.9 0.08 0.06 0.04 0.02 0.00 0 5 10 15 20 25 30 Saturday, 11 April 2009
  • 18. Your turn Find 95% confidence interval for the standard deviation (sd = 7.01, n = 10) P(2.09 < X < 17.61) = 0.95 (n − 1)S 2 X= 2 σ Saturday, 11 April 2009
  • 20. Testing Very closely related to estimation (particularly confidence intervals) But point is to answer a yes/no question: Is the mean of the distribution equal to 0? Do X and Y have the same mean? Saturday, 11 April 2009
  • 21. Your turn The following values have been drawn from a normal distribution with standard deviation 1. 2.9 2.1 3.0 3.2 1.2 3.0 3.3 1.2 2.3 1.5 (mean: 2.13) Is it possible they came from a normal distribution with mean 1.5? Saturday, 11 April 2009
  • 22. Example Create 95% confidence interval. Is it inside? Create 90% confidence interval. Is it inside? … Or we can look up the value directly, using the cdf Saturday, 11 April 2009
  • 23. Testing jargon No: Null hypothesis. Nothing is happening. (Thing we want to disprove) Yes: Alternative hypothesis. Something interesting is happening. Major complication: Saturday, 11 April 2009
  • 24. Absence of evidence is not evidence of absence Saturday, 11 April 2009
  • 25. Implication Means we never “accept” the null hypothesis, just “fail to reject” it. Null distribution is usually simple case for which we know the distribution Saturday, 11 April 2009
  • 26. Your turn Null hypothesis: μ = 1.5 Alternative hypothesis: μ > 1.5 OR μ < 1.5 Under the null hypothesis what is the distribution of the mean? How does what we saw compare to the null distribution? Is it likely or not? Saturday, 11 April 2009
  • 27. P-value P value gives us the probability, under the null hypothesis, that we would have seen a value equal to or more extreme than the value we observed. Strength of evidence for rejecting the null hypothesis. But we need a cut off to make a yes-no decision. How do we choose that cut off? Saturday, 11 April 2009
  • 28. Errors What are the possible errors we can make? False positive. Choose alternative when null is correct. (aka Type 1) False negative. Choose null when alternative is true. (aka Type 2) Saturday, 11 April 2009
  • 29. Terminology Probability of a false positive called α Probability of false negative called 1 - β How are the two related? Usually care more about false positives Saturday, 11 April 2009
  • 30. Testing overview Write down null and alternative hypotheses. Compute test statistic. Convert to p-value. Compare p-value to alpha cut off. Saturday, 11 April 2009
  • 31. Next time Some specific tests. i.e. for common situations what is the distribution under the null-hypothesis Saturday, 11 April 2009