formalization of normal random variables - osman...
TRANSCRIPT
![Page 1: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/1.jpg)
Formalization of Normal Random Variables
M. Qasim, O. Hasan, M. Elleuch, S. Tahar
Hardware Verification Group
ECE Department, Concordia University, Montreal, Canada
CICM 16 July 28, 2016
![Page 2: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/2.jpg)
O. Hasan 2 Formalization of Normal Random Variables
Outline
n Introduction and Motivation
n Formalization
n Case Study: Clock Synchronization in WSNs
n Conclusions
![Page 3: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/3.jpg)
O. Hasan 3 Formalization of Normal Random Variables
Motivation
Environmental Conditions
Aging Phenomena
Unpredictable Inputs
Noise
![Page 4: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/4.jpg)
O. Hasan 4 Formalization of Normal Random Variables
Probabilistic Analysis
Hardware Software
System Model
Property Satisfied?
Random Components
Probabilistic and Statistical Properties
Computer Based Analysis Framework
R andom Variables(Discrete/
C ontinuous)
![Page 5: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/5.jpg)
O. Hasan 5 Formalization of Normal Random Variables
Probabilistic Analysis Basics – Random Variables
n Discrete Random Variables n Attain a countable number of values
n Example n Dice[1, 6]
n Continuous Random Variables n Attain an uncountable number of values
n Examples n Uniform (all real numbers in an interval [a,b])
![Page 6: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/6.jpg)
O. Hasan 6 Formalization of Normal Random Variables
Probabilistic Analysis Basics – Probabilistic Properties
Property Description Examples
Discrete Continuous
Probability Mass Function (PMF)
Probability that the random variable is equal to some number n
Cumulative Distribution Function (CDF)
Probability that the random variable is less than or equal to some number n
Probability Density Function (PDF)
Slope of CDF for continuous random variables
![Page 7: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/7.jpg)
O. Hasan 7 Formalization of Normal Random Variables
Probabilistic Analysis Basics – Statistical Properties
Property Description Illustration
Expectation
Long-run average value of a random variable
Variance Measure of dispersion of a random variable
![Page 8: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/8.jpg)
O. Hasan 8 Formalization of Normal Random Variables
Probabilistic Analysis Approaches
Simulation Formal Methods
Model Checking Theorem Proving
Random Components
Probabilistic State Machine
dgsd
Analysis
Accuracy
Expressiveness
Automation
Maturity
Approximate random variable
functions
Observing some test cases
û
ü
ü
ü
Probabilistic State Machine
Exhaustive Verification
ü
û
ü
û
Random variable functions
Mathematical Reasoning
ü
ü
û
û
![Page 9: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/9.jpg)
O. Hasan 9 Formalization of Normal Random Variables
Probabilistic Analysis using Theorem Proving
System Description
Sys
tem
Pro
pert
ies
(Dis
cret
e R
ando
m V
aria
bles
)
Sys
tem
Pro
pert
ies
(Con
tinuo
us R
ando
m V
aria
bles
)
System Model
Probabilistic Analysis
Proof Goals
Discrete Random Variables
Continuous Random Variables
Random Components
Probabilistic Properties
Statistical Properties
PMF
CDF
Expectation
Variance
Probabilistic Properties
Statistical Properties
CDF
Expectation
Variance
Theorem Prover
Formal Proofs of Properties
Higher-order logic Formalization of Probability Theory
• [Hurd, 2002]: Probability Theory, Discrete Random Variables (RVs), PMF • [Hasan, 2007]: Statistical Properties for Discrete RVs, CDF, Continuous RVs • [Mhamdi, 2011] Probability (Arbitrary space) Lebesgue Integration, Multiple Continuous RVs Statistical Properties • [Hölzl, 2012] Isabelle/HOL: Probability, Measure and Lebesgue Integration, Markov, Central Limit Theorem
![Page 10: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/10.jpg)
O. Hasan 10 Formalization of Normal Random Variables
Paper Contributions
n Formalization of Probability Density Function (PDF)
n Formalization of Normal Random Variable
n Enormous Applications
n Sample mean of most distributions can be treated as Normally Distributed
n Case Study: Clock Synchronization in WSNs
![Page 11: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/11.jpg)
O. Hasan
Probability Density Function
n PDF p(x) of a random variable x is used to define its distribution
n The PDF of a random variable is formally defined as the Radon-Nikodym (RN) derivative of the probability measure with respect to the Lebesgue-Borel measure n RN derivative and probability measure was available in HOL4
n Lebesgue-Borel measure n Ported from Isabelle/HOL [Hölzl, 2012] n Some theorems and tactics (e.g. SET_TAC) also ported from the Lebesgue
measure theory of HOL-Light [Harrison, 2013]
11 Formalization of Normal Random Variables
![Page 12: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/12.jpg)
O. Hasan
Probability Density Function
n The PDF of a random variable is formally defined as the Radon-Nikodym (RN) derivative of the probability measure with respect to the Lebesgue-Borel measure
12 Formalization of Normal Random Variables
Definition: Probability Density Function
![Page 13: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/13.jpg)
O. Hasan
Normal Random Variable
n Normal PDF
n X is a real random variable, i.e., it is measurable from the probability space (p) to Borel space
n The distribution of X is that of the Normal random variable 13 Formalization of Normal Random Variables
Definition: Normal Random Variable
![Page 14: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/14.jpg)
O. Hasan
Normal Random Variable – Properties
14 Formalization of Normal Random Variables
Theorem: PDF of a Normal random variable is non-negative
Theorem: PDF over the whole space is 1
![Page 15: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/15.jpg)
O. Hasan
Normal Random Variable – Properties
15 Formalization of Normal Random Variables
Theorem: PDF of a Normal random variable is symmetric around its mean
Theorem: PDF of a Normal random variable is symmetric around its mean
![Page 16: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/16.jpg)
O. Hasan
Normal Random Variable – Properties
16 Formalization of Normal Random Variables
Theorem: Summation of Normal Random Variables
n The proofs of these properties not only ensure the correctness of our definitions but also facilitate the formal reasoning process about the Normal Random Variable
![Page 17: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/17.jpg)
O. Hasan
Wireless Sensor Network
Application: Probabilistic Clock Synchronization in WSNs
n Synchronizing receivers with one another n Randomness in
Message delivery latency
n Probabilistic bounds on clock synchronization error
n single hop n & multi-hop networks
17 Formalization of Normal Random Variables
![Page 18: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/18.jpg)
O. Hasan
Capturing the Randomness in the Latency
n Multiple pulses are sent from the sender to the set of receivers
n The difference in reception time at the receivers is plotted
18 Formalization of Normal Random Variables
Pairwise difference in packet reception time – Normally Distributed with mean = 0
S
R1 R2
R3
R4
R5 R3 – R4
![Page 19: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/19.jpg)
O. Hasan
Error Bounds – Single Hop
19 Formalization of Normal Random Variables
Theorem: Probability of synchronization error for single hop network
![Page 20: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/20.jpg)
O. Hasan 20 Formalization of Normal Random Variables
Conclusions
n Probabilistic Theorem Proving n Exact Answers n Useful for the analysis of Safety critical application
n Our Contributions n Formalization of Probability Density Functions and
Normal random variables n Case Study
n Clock Synchronization in WSNs
n Future Work n More Applications – Probabilistic Round off Error
Bounds in Computer Arithmetic
![Page 21: Formalization of Normal Random Variables - Osman …ohasan.seecs.nust.edu.pk/talks/CICM_2016_NORMAL.pdfECE Department, Concordia University ... of a random variable x is used to define](https://reader030.vdocument.in/reader030/viewer/2022020303/5af42bf67f8b9ae9488bad8f/html5/thumbnails/21.jpg)
O. Hasan 21 Formalization of Normal Random Variables
Thank you!