2.4 Formal Modelling of Variability
2.4.2 Random Variables
A random variable can be thought of as a quantity that can be measured in a random experiment. The quantity is determined once an experiment has been performed, in other words, an outcome θ ∈Θ (a circuit instance) has been chosen.
Formally, a random variable X is a function that assigns a real number to an outcome of an experiment
X : θ ∈Θ→R. (2.19)
For compactness of notation, θ is omitted and X is written to denote X(θ), wherever it is safe to to do.
Definition 2.13 (Continues Random Variable). We say that a random variable X has a continuous distribution or that X is a continuous random variable if there exists a non- negative function f , defined on the real line, such that for every interval of real numbers (bounded or unbounded), the probability that X takes a value in the interval is the integral of f over the interval.
This work is mostly concerned with continues random variables so that in the following, "random variable" is used to refer to a continues random variable, wherever it is safe to do so.
Random variables can be used to define events. For example, if X(θ)denotes the delay of a particular path, then
{θ∈ Θ : X(θ) ≤Tclk} (2.20)
represents the event (subset of all circuit instances) in which the delay X of the path is less or equal the clock cycle time Tclk. Then the probability of this event is
P({θ∈ Θ : X(θ) ≤Tclk}). (2.21)
Instead of the above expression, the shorthand notationP(X≤Tclk)is used throughout this work.
The distribution of the random variable X can be described by a probability density function, which assigns probabilities to intervals.
Definition 2.14 (Probability Density Function (PDF)). IfX has a continuous distribution, then the function f described indefinition 2.13is called the probability density function (PDF) of X.
The distribution of the random variable X can also be described by the cumulative distribution function.
Definition 2.15 (Cumulative Distribution Function (CDF)). The distribution function or cumulative distribution function (CDF) F of a random variable X is the function
F(x) =P(X≤ x) for −∞<x <∞. (2.22) It can be shown that the cumulative distribution function F has the following properties
• F is monotonically increasing, right-continuous, 0≤ F≤1, • lim
x→+∞F(x) =1 and
• lim
x→−∞F(x) =0.
Theorem 2.16. Let X have a continuous distribution, and let f(x)and F(x)denote its PDF and the CDF, respectively. Then F is continuous at every x,
F(x) = x Z −∞ f(t)dt, (2.23) and dF(x) dx = f(x) (2.24)
at all x such that f is continuous.
The proof can be found in [DeGro12, Theorem 3.3.5].
The term critical path is redefined in a statistical setting as a path whose probability of exceeding a deterministic critical delay for the circuit is higher than a certain threshold [Sriva05]. This is formalized in the following definition.
Definition 2.17. A sensitizable logical path with delay X is called critical path if and only if
P(X>Tclk) > pcri, (2.25) where Tclk denotes the clock cycle time and pcri is a user defined threshold.
Moments
Important properties of random variables can often be described by specific quantitative measures, called moments, instead of the distribution function. For example, the distribution of a random variable X is often summarized by two numbers: the mean as a measure of the centre and the variance as a measure of the dispersion or spread.
Definition 2.18. LetX denote a random variable with probability density function f . Suppose that at least one of the following integrals is finite:
+∞ Z 0 x f(x)dx, 0 Z −∞ x f(x)dx. (2.26)
Then the mean, expectation, or expected value of X is said to exist and is defined to be E(X) =
+∞ Z
−∞
x f(x)dx. (2.27)
If both of the integrals ineq. (2.26)are infinite, thenE(X)does not exist.
Definition 2.19. [Variance/Standard Deviation] Let X be a random variable with finite mean µ =E(X). The variance of X, denoted by Var(X), is defined as
Var(X) =E((X−µ)2). (2.28)
If X has infinite mean or if the mean of X does not exist, it is said that Var(X)does not exist. The standard deviation of X is pVar(X)if the variance exists.
Higher order moments likeE(X2)could be computed fromdefinition 2.18by comput- ing the PDF of the random variable Y= X2. However, the expectation of X2can always be calculated directly using the following theorem.
Theorem 2.20. Let X be a random variable, and let r be a real-valued function of a real variable. If X has a continuous distribution, then
E(r(X)) = +∞ Z
−∞
r(x)f(x)dx, (2.29)
if the mean exists.
The proof can be found in [DeGro12, Theorem 4.1.1].
Definition 2.21. Suppose that X is a random variable withE(X) =µwell defined. For every positive integer k, the expectationE((X−µ)k)is called the kth central moment of X or the kth moment of X about the mean.
For example, the variance of X is the second central moment of X.
The mean and the variance do not uniquely identify a probability distribution. In fact, random variables of very different probability distributions can have the same mean and variance. This leads to a measure that can be used to quantify the lack of symmetry of the PDF.
Definition 2.22 (Skewness). LetX be a random variable with mean µ=E(X), standard deviation σ and finite third moment. The skewness of X, denoted by Sk(X), is defined as
Sk(X) =E((X−µ)3)/σ3. (2.30) The reason for dividing by σ3 is to make this measure independent of the variance of the distribution. In fact, Var((X−µ)3/σ3) =1. The skewness is often used to quantify the deviation of a distribution of a random variable from a normal distribution.
Univariate Normal Distribution
The normal distribution is a very common continuous probability distribution. Definition 2.23. A random variable X has the univariate normal distribution with mean µ and variance σ2 (−∞ <µ<∞ and σ>0) if X has a continuous distribution with the following PDF: f(x; µ, σ2) = 1 p2πσ2exp − (x−µ)2 2σ2 ! for −∞< x<∞. (2.31)
The proof that the above defined function is indeed a PDF can be found in [DeGro12, Theorem 5.6.1]. In the following, the convenient shorthand notation X∼ N (µ, σ2)is used to describe that X has a univariate normal distribution with parameters µ and σ. Theorem 2.24. The mean and variance of the distribution with PDF given byeq. (2.31)are µ and σ2, respectively.
The proof can be found in [DeGro12, Theorem 5.6.3].
The univariate standard normal distribution is a special case of the univariate normal distribution with µ =0 and σ=1. In this work, the function φ with
φ(x):= √1 2πe
−x22 (2.32)
will be used to denote the probability density function and the functionΦ with Φ(x):=
x
Z
−∞
φ(y)dy (2.33)
will be used to denote the cumulative distribution function of the standard normal distribution.
Whenever a random experiment is replicated many times, the random variable that represents the average result over all replicates tends to be similar to a normal distribu- tion. The underlying fundamental result is known as the central limit theorem, which makes the normal distribution remarkably useful.
Theorem 2.25 (Lindeberg-Feller Central Limit Theorem). Suppose that{Xi}, i=1, . . . , n is a sequence of independent random variables with finite means µi and finite positive variances σi2and ¯Xn= (1/n)∑ni=1Xi. Let
¯µn= 1
n(µ1+µ2+ · · · +µn) and ¯σn2 = 1
n(σ12+σ22+ · · · +σn2). If no single term dominates the average variance ¯σn2, say
lim
n→∞
1
n¯σnmaxi (σi) =0 (2.34)
and if the average variance converges to a finite constant ¯σ2 = lim n→∞¯σ 2 n, (2.35) then √ n(¯Xn− ¯µn)−→ N (d 0, ¯σ2). (2.36)
Theorem 2.25is a simplified description of the central limit theorem, which is quoted from [Green12, Theorem D.19]. The complete theorem, the Lindeberg condition and an elaborate proof can for example be found in [Resni14, Theorem 9.8.1].
Descriptive Statistics: Quartiles and Box Plot
In some situations the distribution of a random variable is unknown and only a sample of measurements is available, for example of the oscillation frequency of a particular ring oscillator on a large number of circuits. These measured values must be summarized for further analysis [Montg13].
The sample median describes the central tendency of the data by dividing the data into two parts of equal size, half below and half above the median. In case the number of measurements is even, then the median is defined to be halfway between the two central measured values. The ordered set of measured values can be further divided into four equal sized parts, where the division points are called quartiles. The first quartile has approximately 25% of the measured values below and 75% of the measured values above it. The second quartile is the median and the third quartile has approximately 75% of the measured values below its value.
A box plot describes several important features of the data, such as center, spread and skewness, in a compact diagram. The box plot (box-and whisker plot) shows the minimum, maximum and the three quartiles in a rectangular box. The left/lower edge of the box is the first quartile and the right/upper edge is the third quartile. The black line inside the box marks the second quartile, which is the median of the data. The left/lower whisker is the line between the minimum and the first quartile. Likewise, the right/upper whisker is the line between the third quartile and the maximum. A typical example is shown infig. 2.3. It shows that the distribution is fairly symmetric because the lengths of the left and right whisker are about the same and the black line (median) roughly divides the box into two equal parts.
q Figure 2.3 —Description of a box plot