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

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

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