SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Stat310            Continuous variables


                              Hadley Wickham
Tuesday, 3 February 2009
1. Notes about the exam
                2. Finish off Poisson
                3. Introduction to continuous variables
                4. The uniform distribution




Tuesday, 3 February 2009
Exam
                    • Exam structure
                    • Grading tomorrow
                    • Purpose of notes
                    • Question 1 - most of you managed to get
                      it (eventually) - at least 3 different ways
                    • Question 2 & 4 - did really well
                    • Question 3 - more of a struggle


Tuesday, 3 February 2009
Poisson distribution
                    X = Number of times some event happens
                    If number of events occurring in non-
                    overlapping times is independent, and
                    Probability of exactly one event occurring
                    in short interval of length h is ∝ λh, and
                    Probability of two or more events in a
                    sufficiently short internal is basically 0
                    Then X ~ Poisson(λ)

Tuesday, 3 February 2009
Examples

                    Number of calls to a switchboard
                    Number of eruptions of a volcano
                    Number of alpha particles emitted from a
                    radioactive source
                    Number of defects in a roll of paper



Tuesday, 3 February 2009
λ=1                                      λ=2
       0.35                                              0.25
       0.30
                                                         0.20
       0.25
                                                         0.15
       0.20
f(x)




                                                  f(x)
       0.15
                                                         0.10
       0.10
                                                         0.05
       0.05

       0.00                                              0.00
              0            5       10   15   20                 0   5       10   15   20
                               x                                        x


                                         λ=5                                     λ = 20
                                                         0.12
       0.15
                                                         0.10

                                                         0.08
       0.10
f(x)




                                                  f(x)
                                                         0.06

                                                         0.04
       0.05
                                                         0.02

       0.00                                              0.00
              0            5       10   15   20                 0   5       10   15   20
                               x                                        x
Tuesday, 3 February 2009
What is λ?

                    • What is the sample space of X?
                    • Let’s start by looking at the mean and
                      variance of X.
                    • How?




Tuesday, 3 February 2009
What is λ?
                    • λ is the mean rate of events per unit
                      time.
                    • If you change the unit of time from 1 to
                      t, you’ll expect λt events - another
                      Poisson process/distribution
                    • ie. if X ~ Poisson(λ), and Y = tX, then Y
                      ~ Poisson(λt)


Tuesday, 3 February 2009
Example
                    • A small amount of radioactive material
                      emits one alpha particle on average
                      every second. If we assume it is a
                      Poisson process, then:
                    • How many particles would be emitted
                      ever minute, on average?
                    • What is the probability that no particles
                      are emitted in 10 seconds?

Tuesday, 3 February 2009
Continuous random
                           variables


Tuesday, 3 February 2009
Continuous r.v.
                    • Sample space is the real line
                    • Mathematical tools: more differentiation
                      + integration
                    • Same vocabulary, slightly different
                      definitions
                    • New distributions


Tuesday, 3 February 2009
Intuition
                    Imagine you have a spinner which is
                    equally likely to point in any direction. Let
                    X be the angle the spinner points.
                    What is P(X ∈ [0, 90]) ? What is P(X ∈
                    [270, 90]) ? What is P(X ∈ [70, 98]) ?
                    What is the general formula?
                    What is P(X = 90) ?


Tuesday, 3 February 2009
Cumulative distribution function
                                                x
           F (x) = P (X ≤ x) =                      f (t)dt
                                               −∞


                                 b
       P (X ∈ [a, b]) =              f (x)dx = F (b) − F (a)
                             a




         P (X = a) = P (x = [a, a]) = F (a) − F (a) = 0
Tuesday, 3 February 2009
f (x)     For continuous x,
                            f(x) is a probability
                            density function.




                   Not a probability!

Tuesday, 3 February 2009
f (x)
  Integrate                        Differentiate




                           F(x)
Tuesday, 3 February 2009
Conditions



                      f (x) ≥ 0     ∀x ∈ R

                               f (x) = 1
                           R

Tuesday, 3 February 2009
Questions?

                    Is f(x) < 1 for all x?


                    What do those conditions imply about
                    F(x)?




Tuesday, 3 February 2009
E(u(X)) =               u(x)f (x)dx
                           R



             MX (t) =          e f (x)dx
                               tx
                           R

Tuesday, 3 February 2009
The discrete uniform

                    Assigns probability uniformly in an interval
                    [a, b] of the real line
                    X ~ Uniform(a, b)
                    What are F(x) and f(x) ?
                                 b
                                     f (x)dx = 1
                             a
Tuesday, 3 February 2009
Intuition

                    X ~ Unif(1, b)
                    What do you expect the mean of X to be?
                    What about the variance?




Tuesday, 3 February 2009
a+b
                            E(X) =
                                    2
                                     (b − a)
                                           2
                           V ar(X) =
                                        12

Tuesday, 3 February 2009
Question

                    X ~ Unif(0, 1)
                    Y = 10 X
                    What is the distribution of Y?
                    How does the variance of Y compare to
                    the variance of X?



Tuesday, 3 February 2009

Contenu connexe

Similaire à 08 Continuous (7)

07 Mgf
07 Mgf07 Mgf
07 Mgf
 
06 Mean Var
06 Mean Var06 Mean Var
06 Mean Var
 
Applied Business Statistics ,ken black , ch 5
Applied Business Statistics ,ken black , ch 5Applied Business Statistics ,ken black , ch 5
Applied Business Statistics ,ken black , ch 5
 
11 Simulation
11 Simulation11 Simulation
11 Simulation
 
09 Unif Exp Gamma
09 Unif Exp Gamma09 Unif Exp Gamma
09 Unif Exp Gamma
 
Lesson 13: Exponential and Logarithmic Functions (Section 041 handout)
Lesson 13: Exponential and Logarithmic Functions (Section 041 handout)Lesson 13: Exponential and Logarithmic Functions (Section 041 handout)
Lesson 13: Exponential and Logarithmic Functions (Section 041 handout)
 
20 Bivariate
20 Bivariate20 Bivariate
20 Bivariate
 

Plus 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
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
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
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

08 Continuous

  • 1. Stat310 Continuous variables Hadley Wickham Tuesday, 3 February 2009
  • 2. 1. Notes about the exam 2. Finish off Poisson 3. Introduction to continuous variables 4. The uniform distribution Tuesday, 3 February 2009
  • 3. Exam • Exam structure • Grading tomorrow • Purpose of notes • Question 1 - most of you managed to get it (eventually) - at least 3 different ways • Question 2 & 4 - did really well • Question 3 - more of a struggle Tuesday, 3 February 2009
  • 4. Poisson distribution X = Number of times some event happens If number of events occurring in non- overlapping times is independent, and Probability of exactly one event occurring in short interval of length h is ∝ λh, and Probability of two or more events in a sufficiently short internal is basically 0 Then X ~ Poisson(λ) Tuesday, 3 February 2009
  • 5. Examples Number of calls to a switchboard Number of eruptions of a volcano Number of alpha particles emitted from a radioactive source Number of defects in a roll of paper Tuesday, 3 February 2009
  • 6. λ=1 λ=2 0.35 0.25 0.30 0.20 0.25 0.15 0.20 f(x) f(x) 0.15 0.10 0.10 0.05 0.05 0.00 0.00 0 5 10 15 20 0 5 10 15 20 x x λ=5 λ = 20 0.12 0.15 0.10 0.08 0.10 f(x) f(x) 0.06 0.04 0.05 0.02 0.00 0.00 0 5 10 15 20 0 5 10 15 20 x x Tuesday, 3 February 2009
  • 7. What is λ? • What is the sample space of X? • Let’s start by looking at the mean and variance of X. • How? Tuesday, 3 February 2009
  • 8. What is λ? • λ is the mean rate of events per unit time. • If you change the unit of time from 1 to t, you’ll expect λt events - another Poisson process/distribution • ie. if X ~ Poisson(λ), and Y = tX, then Y ~ Poisson(λt) Tuesday, 3 February 2009
  • 9. Example • A small amount of radioactive material emits one alpha particle on average every second. If we assume it is a Poisson process, then: • How many particles would be emitted ever minute, on average? • What is the probability that no particles are emitted in 10 seconds? Tuesday, 3 February 2009
  • 10. Continuous random variables Tuesday, 3 February 2009
  • 11. Continuous r.v. • Sample space is the real line • Mathematical tools: more differentiation + integration • Same vocabulary, slightly different definitions • New distributions Tuesday, 3 February 2009
  • 12. Intuition Imagine you have a spinner which is equally likely to point in any direction. Let X be the angle the spinner points. What is P(X ∈ [0, 90]) ? What is P(X ∈ [270, 90]) ? What is P(X ∈ [70, 98]) ? What is the general formula? What is P(X = 90) ? Tuesday, 3 February 2009
  • 13. Cumulative distribution function x F (x) = P (X ≤ x) = f (t)dt −∞ b P (X ∈ [a, b]) = f (x)dx = F (b) − F (a) a P (X = a) = P (x = [a, a]) = F (a) − F (a) = 0 Tuesday, 3 February 2009
  • 14. f (x) For continuous x, f(x) is a probability density function. Not a probability! Tuesday, 3 February 2009
  • 15. f (x) Integrate Differentiate F(x) Tuesday, 3 February 2009
  • 16. Conditions f (x) ≥ 0 ∀x ∈ R f (x) = 1 R Tuesday, 3 February 2009
  • 17. Questions? Is f(x) < 1 for all x? What do those conditions imply about F(x)? Tuesday, 3 February 2009
  • 18. E(u(X)) = u(x)f (x)dx R MX (t) = e f (x)dx tx R Tuesday, 3 February 2009
  • 19. The discrete uniform Assigns probability uniformly in an interval [a, b] of the real line X ~ Uniform(a, b) What are F(x) and f(x) ? b f (x)dx = 1 a Tuesday, 3 February 2009
  • 20. Intuition X ~ Unif(1, b) What do you expect the mean of X to be? What about the variance? Tuesday, 3 February 2009
  • 21. a+b E(X) = 2 (b − a) 2 V ar(X) = 12 Tuesday, 3 February 2009
  • 22. Question X ~ Unif(0, 1) Y = 10 X What is the distribution of Y? How does the variance of Y compare to the variance of X? Tuesday, 3 February 2009