SlideShare a Scribd company logo
Stat310            Transformations


                            Hadley Wickham
Monday, 16 February 2009
1. Recap
               2. Exponential derivation
               3. Transforming random variables
                      1. Distribution function technique
                      2. Change of variables technique
               4. Interesting properties of cdf


Monday, 16 February 2009
Recap
                     f (x) = cx 0 < x < 10
                   • What is the cdf?
                   • What must c be for f to be a pdf?
                   • What is P(2 < X < 8)?




Monday, 16 February 2009
Exponential


                   • Derivation
                   • Moment generating function




Monday, 16 February 2009
Your turn
                   Let Y be the amount of time until I make a
                   mistake on the board. Assume Y ~
                   Exp(10) (i.e. I make 10 mistakes per hour).
                   If I go for 30 minutes without making a
                   mistake, what’s the probability I go for 40
                   minutes without making a mistake?
                   i.e. What is P(Y > 40 | Y > 30) ? How
                   does it compare to P(Y > 10)?

Monday, 16 February 2009
Memorylessness

                   • In general, if Y is exponential
                   • P(Y > y + a | Y > y ) = P(Y > a)
                   • Can you prove that?
                   • No memory




Monday, 16 February 2009
Transformations



Monday, 16 February 2009
Example
                    x      -5       0        5      10    20
                 f(x)      0.2     0.1       0.3    0.1   0.3

                   Let X be a discrete random variable with
                   pmf f as defined above.
                   Write out the pmfs for:
                   A=X+2         B = 3*X   C = X2


Monday, 16 February 2009
Continuous
                   Let X ~ Unif(0, 1)
                   What are the distributions
                   of the following variables?
                   A = 10 X
                   B = 5X + 3
                   C=      X2




Monday, 16 February 2009
Transformations
                     Distribution     Change of
                      function         variable
                     technique        technique




Monday, 16 February 2009
Distribution function
                                 technique

                   X = Unif(0, 1)
                   Y = X2
                   P(Y < y) =   P(X2<   y) = P(X < √y)
                   ...




Monday, 16 February 2009
Your turn

                   X ~ Exponential(θ)
                   Y = log(X)


                   Find fY(y). Does y have a named
                   distribution?


Monday, 16 February 2009
Change of variables
                   If Y = u(X), and
                   v is the inverse of u, X = v(Y)
                   then
                   fY(y) = fX(v(y)) |v’(y)|




Monday, 16 February 2009
Your turn

                   X ~ Exponential(θ). Y = log(X).
                   What is fY(y)?
                   X ~ Uniform(0, 10). Y =   X2.

                   What is fY(y)?




Monday, 16 February 2009
Theorem 3.5-1
                   IF
                   Y ~ Uniform(0, 1)
                   F a cdf
                   THEN
                   X=      F -1(Y)   is a rv with cdf F(x)
                   (Assume F strictly increasing for simplicity)


Monday, 16 February 2009
Theorem 3.5-2
                   IF
                   X has cdf F
                   Y = F(X)
                   THEN
                   Y ~ Uniform(0, 1)
                   (Assume F strictly increasing for simplicity)



Monday, 16 February 2009

More Related Content

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

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

10 Transformations

  • 1. Stat310 Transformations Hadley Wickham Monday, 16 February 2009
  • 2. 1. Recap 2. Exponential derivation 3. Transforming random variables 1. Distribution function technique 2. Change of variables technique 4. Interesting properties of cdf Monday, 16 February 2009
  • 3. Recap f (x) = cx 0 < x < 10 • What is the cdf? • What must c be for f to be a pdf? • What is P(2 < X < 8)? Monday, 16 February 2009
  • 4. Exponential • Derivation • Moment generating function Monday, 16 February 2009
  • 5. Your turn Let Y be the amount of time until I make a mistake on the board. Assume Y ~ Exp(10) (i.e. I make 10 mistakes per hour). If I go for 30 minutes without making a mistake, what’s the probability I go for 40 minutes without making a mistake? i.e. What is P(Y > 40 | Y > 30) ? How does it compare to P(Y > 10)? Monday, 16 February 2009
  • 6. Memorylessness • In general, if Y is exponential • P(Y > y + a | Y > y ) = P(Y > a) • Can you prove that? • No memory Monday, 16 February 2009
  • 8. Example x -5 0 5 10 20 f(x) 0.2 0.1 0.3 0.1 0.3 Let X be a discrete random variable with pmf f as defined above. Write out the pmfs for: A=X+2 B = 3*X C = X2 Monday, 16 February 2009
  • 9. Continuous Let X ~ Unif(0, 1) What are the distributions of the following variables? A = 10 X B = 5X + 3 C= X2 Monday, 16 February 2009
  • 10. Transformations Distribution Change of function variable technique technique Monday, 16 February 2009
  • 11. Distribution function technique X = Unif(0, 1) Y = X2 P(Y < y) = P(X2< y) = P(X < √y) ... Monday, 16 February 2009
  • 12. Your turn X ~ Exponential(θ) Y = log(X) Find fY(y). Does y have a named distribution? Monday, 16 February 2009
  • 13. Change of variables If Y = u(X), and v is the inverse of u, X = v(Y) then fY(y) = fX(v(y)) |v’(y)| Monday, 16 February 2009
  • 14. Your turn X ~ Exponential(θ). Y = log(X). What is fY(y)? X ~ Uniform(0, 10). Y = X2. What is fY(y)? Monday, 16 February 2009
  • 15. Theorem 3.5-1 IF Y ~ Uniform(0, 1) F a cdf THEN X= F -1(Y) is a rv with cdf F(x) (Assume F strictly increasing for simplicity) Monday, 16 February 2009
  • 16. Theorem 3.5-2 IF X has cdf F Y = F(X) THEN Y ~ Uniform(0, 1) (Assume F strictly increasing for simplicity) Monday, 16 February 2009