SlideShare a Scribd company logo
1 of 26
Download to read offline
Stat310              Moments


                            Hadley Wickham
Saturday, 30 January 2010
Engineer Your Career
                    Monday, February 15
                    7:00 PM - 8:30 PM
                    McMurtry Auditorium
                    Find out what you can do with a degree in
                    engineering from a panel of successful Rice
                    engineering graduates who have gone into a
                    variety of professions. (Plus get dessert!)
                    http://engineering.rice.edu/EventsList.aspx?
                    EventRecord=13137


Saturday, 30 January 2010
Homework
                    Due today.
                    From now on, if late, put in Xin Zhao’s
                    mail box in the DH mailroom.
                    Another one due next Thursday
                    Buy a stapler
                    Use official name


Saturday, 30 January 2010
1. Finish off proof
                2. More about expectation
                3. Variance and other moments
                4. The moment generating function
                5. The Poisson distribution
                6. Feedback


Saturday, 30 January 2010
Proof, continued



Saturday, 30 January 2010
Expectation
                            of a function


Saturday, 30 January 2010
Expectation
                    Expectation is a linear operator:
                    Expectation of a sum =
                    sum of expectations (additive)
                    Expectation of a constant * a function =
                    constant * expectation of function (homogenous)
                    Expectation of a constant is a constant.


                                                         T 2.6.2 p. 95
Saturday, 30 January 2010
Your turn

                    Write (or recall) the mathematical
                    description of these properties.
                    Work in pairs for two minutes.
                    (Extra credit this week is to prove these
                    properties)



Saturday, 30 January 2010
Moments

                    The ith moment of a random variable is
                    defined as E(X i) = μ' . The ith central
                                         i
                    moment is defined as E[(X - E(X))   i] = μ
                                                              i

                    The mean is the ________ moment. The
                    variance is the ________ moment.



Saturday, 30 January 2010
Name      Symbol    Formula

                    1        mean        μ           μ'1

                    2       variance     σ2     μ2 = μ'2 -    μ 2



                    3       skewness     α3        μ3   /σ3


                    4       kurtosis     α4        μ4   /σ4




Saturday, 30 January 2010
3                   4

                                                               var =1
   0.6

   0.5

   0.4
                                                            skew = 0
   0.3
                                                            kurt = 3.4
   0.2

   0.1

   0.0
                                    5                   6
   0.6

   0.5

   0.4

   0.3

   0.2

   0.1

   0.0
                            2   4       6   8   2   4        6     8

Saturday, 30 January 2010
0.4                   1.2                   1.6

                                                                        mean = 4
   0.6

   0.5

   0.4
                                                                        skew = 0
   0.3
                                                                        kurt ≈ 2.5
   0.2

   0.1

   0.0
                                2.6                   2.8                   3.6
   0.6

   0.5

   0.4

   0.3

   0.2

   0.1

   0.0
                   2        4         6   8   2   4         6   8   2   4         6   8

Saturday, 30 January 2010
−1.83               −1.03               −1.02               −0.91
   0.8

   0.6

   0.4

   0.2

   0.0
                            −0.61               −0.21               0.21                0.91
   0.8

   0.6

   0.4

   0.2

   0.0
                            1.02                1.83
   0.8

   0.6
                                                                                    mean ≈ 4
   0.4
                                                                                    var = 1.3
   0.2

   0.0
                2           4       6   8   2   4       6   8   2   4       6   8   2   4       6   8

Saturday, 30 January 2010
1.00               1.46               1.59

                                                                  mean = 4
   0.5


   0.4
                                                                  skew = 0
   0.3
                                                                    var ≈ 4
   0.2


   0.1


   0.0
                            1.87               2.05               2.26
   0.5


   0.4


   0.3


   0.2


   0.1


   0.0
                   2        4      6   8   2   4      6   8   2   4      6   8

Saturday, 30 January 2010
mgf
                    The moment generating function (mgf)
                    is Mx(t) = E(eXt)
                    (Provided it is finite in a neighbourhood of 0)

                    Why is it called the mgf? (What happens if
                    you differentiate it multiple times).
                    Useful property: If MX(t) = MY(t) then X and
                    Y have the same pmf.


Saturday, 30 January 2010
Plus, once we’ve got it, it
                can make it much easier to
                find the mean and variance



Saturday, 30 January 2010
Expectation of
                            binomial (take 2)
                    Figure out mgf.
                    (Random mathematical fact: binomial theorem)

                    Differentiate & set to zero.


                    Then work out variance.



Saturday, 30 January 2010
Your turn


                    Compute mean and variance of the
                    binomial. Remember the variance is the
                    2nd central moment, not the 2nd moment.




Saturday, 30 January 2010
Poisson



                                      3.2.2 p. 119
Saturday, 30 January 2010
Poisson distribution
                    X = Number of times some event happens
                    (1) If number of events occurring in non-
                    overlapping times is independent, and
                    (2) probability of exactly one event
                    occurring in short interval of length h is ∝
                    λh, and
                    (3) probability of two or more events in a
                    sufficiently short internal is basically 0

Saturday, 30 January 2010
Poisson

                    X ~ Poisson(λ)
                    Sample space: positive integers
                    λ ∈ [0, ∞)




Saturday, 30 January 2010
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



Saturday, 30 January 2010
Example
                    On average, a small amount of
                    radioactive material emits ten alpha
                    particles every ten seconds. If we
                    assume it is a Poisson process, then:
                    What is the probability that no particles
                    are emitted in 10 seconds?
                    Make sure to set up mathematically.


Saturday, 30 January 2010
mgf, mean & variance

                    Random mathematical fact.
                    Compute mgf.
                    Compute mean &   2 nd   moment.
                    Compute variance.




Saturday, 30 January 2010
Next week

                    Repeat for continuous variables.
                    Make absolutely sure you have read 2.5
                    and 2.6. (hint hint)




Saturday, 30 January 2010
Feedback



Saturday, 30 January 2010

More Related Content

Viewers also liked

Viewers also liked (9)

Elaboração e edição de textos
Elaboração e edição de textosElaboração e edição de textos
Elaboração e edição de textos
 
Bachelor thesis of do dai chi
Bachelor thesis of do dai chiBachelor thesis of do dai chi
Bachelor thesis of do dai chi
 
Moment補充資料
Moment補充資料Moment補充資料
Moment補充資料
 
Multivariate
MultivariateMultivariate
Multivariate
 
Calculus II - 30
Calculus II - 30Calculus II - 30
Calculus II - 30
 
Moment Generating Functions
Moment Generating FunctionsMoment Generating Functions
Moment Generating Functions
 
Calculus II - 36
Calculus II - 36Calculus II - 36
Calculus II - 36
 
paris 2.0 = Wave 5 : The socialisation of brands, une étude sur les usages de...
paris 2.0 = Wave 5 : The socialisation of brands, une étude sur les usages de...paris 2.0 = Wave 5 : The socialisation of brands, une étude sur les usages de...
paris 2.0 = Wave 5 : The socialisation of brands, une étude sur les usages de...
 
Designing for Socialisation
Designing for SocialisationDesigning for Socialisation
Designing for Socialisation
 

More from 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
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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 interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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.pptxEarley Information Science
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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 MountPuma Security, LLC
 
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 2024Rafal Los
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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.pptxKatpro Technologies
 
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...apidays
 
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
 
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 MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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 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
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

06 Moments

  • 1. Stat310 Moments Hadley Wickham Saturday, 30 January 2010
  • 2. Engineer Your Career Monday, February 15 7:00 PM - 8:30 PM McMurtry Auditorium Find out what you can do with a degree in engineering from a panel of successful Rice engineering graduates who have gone into a variety of professions. (Plus get dessert!) http://engineering.rice.edu/EventsList.aspx? EventRecord=13137 Saturday, 30 January 2010
  • 3. Homework Due today. From now on, if late, put in Xin Zhao’s mail box in the DH mailroom. Another one due next Thursday Buy a stapler Use official name Saturday, 30 January 2010
  • 4. 1. Finish off proof 2. More about expectation 3. Variance and other moments 4. The moment generating function 5. The Poisson distribution 6. Feedback Saturday, 30 January 2010
  • 6. Expectation of a function Saturday, 30 January 2010
  • 7. Expectation Expectation is a linear operator: Expectation of a sum = sum of expectations (additive) Expectation of a constant * a function = constant * expectation of function (homogenous) Expectation of a constant is a constant. T 2.6.2 p. 95 Saturday, 30 January 2010
  • 8. Your turn Write (or recall) the mathematical description of these properties. Work in pairs for two minutes. (Extra credit this week is to prove these properties) Saturday, 30 January 2010
  • 9. Moments The ith moment of a random variable is defined as E(X i) = μ' . The ith central i moment is defined as E[(X - E(X)) i] = μ i The mean is the ________ moment. The variance is the ________ moment. Saturday, 30 January 2010
  • 10. Name Symbol Formula 1 mean μ μ'1 2 variance σ2 μ2 = μ'2 - μ 2 3 skewness α3 μ3 /σ3 4 kurtosis α4 μ4 /σ4 Saturday, 30 January 2010
  • 11. 3 4 var =1 0.6 0.5 0.4 skew = 0 0.3 kurt = 3.4 0.2 0.1 0.0 5 6 0.6 0.5 0.4 0.3 0.2 0.1 0.0 2 4 6 8 2 4 6 8 Saturday, 30 January 2010
  • 12. 0.4 1.2 1.6 mean = 4 0.6 0.5 0.4 skew = 0 0.3 kurt ≈ 2.5 0.2 0.1 0.0 2.6 2.8 3.6 0.6 0.5 0.4 0.3 0.2 0.1 0.0 2 4 6 8 2 4 6 8 2 4 6 8 Saturday, 30 January 2010
  • 13. −1.83 −1.03 −1.02 −0.91 0.8 0.6 0.4 0.2 0.0 −0.61 −0.21 0.21 0.91 0.8 0.6 0.4 0.2 0.0 1.02 1.83 0.8 0.6 mean ≈ 4 0.4 var = 1.3 0.2 0.0 2 4 6 8 2 4 6 8 2 4 6 8 2 4 6 8 Saturday, 30 January 2010
  • 14. 1.00 1.46 1.59 mean = 4 0.5 0.4 skew = 0 0.3 var ≈ 4 0.2 0.1 0.0 1.87 2.05 2.26 0.5 0.4 0.3 0.2 0.1 0.0 2 4 6 8 2 4 6 8 2 4 6 8 Saturday, 30 January 2010
  • 15. mgf The moment generating function (mgf) is Mx(t) = E(eXt) (Provided it is finite in a neighbourhood of 0) Why is it called the mgf? (What happens if you differentiate it multiple times). Useful property: If MX(t) = MY(t) then X and Y have the same pmf. Saturday, 30 January 2010
  • 16. Plus, once we’ve got it, it can make it much easier to find the mean and variance Saturday, 30 January 2010
  • 17. Expectation of binomial (take 2) Figure out mgf. (Random mathematical fact: binomial theorem) Differentiate & set to zero. Then work out variance. Saturday, 30 January 2010
  • 18. Your turn Compute mean and variance of the binomial. Remember the variance is the 2nd central moment, not the 2nd moment. Saturday, 30 January 2010
  • 19. Poisson 3.2.2 p. 119 Saturday, 30 January 2010
  • 20. Poisson distribution X = Number of times some event happens (1) If number of events occurring in non- overlapping times is independent, and (2) probability of exactly one event occurring in short interval of length h is ∝ λh, and (3) probability of two or more events in a sufficiently short internal is basically 0 Saturday, 30 January 2010
  • 21. Poisson X ~ Poisson(λ) Sample space: positive integers λ ∈ [0, ∞) Saturday, 30 January 2010
  • 22. 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 Saturday, 30 January 2010
  • 23. Example On average, a small amount of radioactive material emits ten alpha particles every ten seconds. If we assume it is a Poisson process, then: What is the probability that no particles are emitted in 10 seconds? Make sure to set up mathematically. Saturday, 30 January 2010
  • 24. mgf, mean & variance Random mathematical fact. Compute mgf. Compute mean & 2 nd moment. Compute variance. Saturday, 30 January 2010
  • 25. Next week Repeat for continuous variables. Make absolutely sure you have read 2.5 and 2.6. (hint hint) Saturday, 30 January 2010