Professional Documents
Culture Documents
Cristian Gatu
1 Faculty of Computer Science
Statistical measures
Location measures
Dispersion measures
Content
Statistical measures
Location measures
Dispersion measures
Definitions and axioms of probability
Number of outcomes in E |E |
P(E ) = = .
Number of outcomes in S |S|
Probability
◮ The complement of A: A = {e | e ∈ S, e ∈
/ A}.
Examples
Throw a die: S = {1, 2, 3, 4, 5, 6}.
– E = {2, 4, 6} the die is an even number.
– E = {1, 3, 5} the die is an odd number.
P(E ) = 3/6 = 0.5 and P(E ) = 1 − 0.5 = 0.5.
Independent and Dependent events
Examples
In a coin tossing experiment the fact that at the first toss we
get heads or tails does not provide any information about the
second toss.
Independent and Dependent events
Examples
Consider the following events in the toss of a die:
A = {Observe an odd number}.
B = {Observe an even number}.
The events A and B are dependent since the one event
pre-excludes the other.
Bayes Theorem
P(A ∩ B)
◮ Conditional probability: P(A|B) =
P(B)
P(A|B)P(B)
◮ Bayes formula: P(B|A) =
P(A)
Statistical measures
Location measures
Dispersion measures
Discrete random variables
P(X = xi ) = pi where i = 1, 2, . . . , n.
P(x1 ≤ X < x2 ) = p1
P(x2 ≤ X < x3 ) = p2
..
.
P(xn ≤ X < xn+1 ) = pn
◮ X is said to be a continues random variable iff
n
X
pi = 1 and 0 ≤ pi ≤ 1.
i=1
Probability density function
◮ The probability density function (pdf) of a
continues random variable X is a function that allocates
probabilities to all of the ranges of values that the
random variable can take.
◮ The pdf takes the form of a function of x, say f (x).
Zx2
P(x1 ≤ X ≤ x2 ) = f (x) dx.
x1
✻
y y = f (x)
....... ..
...........
........... ..
...
...
.
...........................................................
✲
a x1 x2 b
x
Expectation
x 0 1 2 3 4
1 1 1 1 1
P(X = x) 4 8 8 4 4
X
E (X ) = x P(X = x)
all x
1 1 1 1 1
=0× +1× +2× +3× +4×
4 8 8 4 4
= 17/8 = 2.125.
Example 2
3
f (x) = x(2 − x) for 0 ≤ x ≤ 2.
4
Z2 Z2
3
E (X ) = x f (x)dx = (2x 2 − x 3 )dx
4
0 0
3 h 2 3 1 4 i2 3 16 16
= x − x = ( − )
4 3 4 0 4 3 4
= 1.
f(x) = 3/4 x (2 − x), 0 <= x <= 2
0.6
0.4
f (x)
0.2
0.0
x
Expectation. Properties
1. E (a) = a.
2. E (aX ) = aE (X ).
Var (X ) = E (X − µ)2
where µ = E (X ).
Solution 2
Var (X ) = E (X 2 ) − E (X ) .
X 1 1 1
E (X ) = x P(X = x) = 0 × + 1 × + 2 × = 1.
4 2 4
X 1 1 1 3
E (X 2 ) = x 2 P(X = x) = 02 × + 12 × + 22 × = .
4 2 4 2
3 1
Var (X ) = − 12 =
2 2
Content
Statistical measures
Location measures
Dispersion measures
Content
Statistical measures
Location measures
Dispersion measures
Mean
◮ The arithmetic mean (or just mean) of a set of
numbers {x1 , x2 , . . . , xn } is denoted by x̄ and is defined
by:
n
1 1X
x̄ = (x1 + x2 . . . xn ) = xi .
n n i=1
xi -3 -2 -1 0 1 2 3
fi 6 5 4 3 2 1 1
fi xi -18 -10 -4 0 2 2 3
P P
fi = 22, fi xi = −25, x̄ = −25/22 = −1.14.
Median
Remark
The mean has the disadvantage of taking extreme values into
account, especially for a small set of numbers.
Examples
1 + Pn f
i=1 i
th
2
Examples
1. The mode of the set {2, 3, 3, 1, 3, 2, 4, 5, 8, 3, 2, 4, 4, 3}
is 3.
2. The set {8, 6, 8, 5, 5, 7, 6, 8, 6, 9} has the two modes 6
and 8.
Remark
Note that for a set that has no repeated values the mode does
not exist.
Content
Statistical measures
Location measures
Dispersion measures
Range
Remark 1
The range uses the only extreme values !
Remark 2
The Range is the simplest of all measures of dispersion and
can be calculated very quickly and easily.
Range
Examples
1. The set {6, 5 , 7, 10 , 8, 9} has Range = 10 − 5 = 5.
2. The set {600, 610, 620, 600 , 610, 650 , 640, 650, 650}
has Range = 650 − 600 = 50.
3. The set {600, 610, 620, 200 , 610, 1000 , 640, 650, 650}
has Range = 800.
Standard Deviation
Examples
65 21 1
2
S= − (3.75) = (16.25 − 14.063) 2 = 1.48
4
Variance
◮ The Variance of a set (or distribution) of numbers is
defined as the square of the standard deviation and is
denoted by S 2 .
◮ For a set of numbers:
Pn 2 n
2 i (xi − x̄) 1X 2
S = = x − x̄ 2 .
n n i i
− x̄)2 X fi xi2
P
2 (xi
i fiP
S = = P − x̄ 2 .
i fi i i fi