Download Formula Sheet

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Formula Sheet
December 8, 2011
Abstract
I type this for your convenicne. There may be errors. Use at your own risk. It is
your responsible to check it is correct or not before using it.
1
Descriptive Statistics
1.1
Central Tendency
1. (Arithmetic) Mean:
PN
xi
Population: = i=1
Pn N
xi
Sample: x = i=1
n
Pn
wi xi
2. Weighted mean:xw = Pi=1
n
i=1 wi
3. Median:
The 0:5 (n + 1)th data.
If n is even, then we take 0:5 (n + 1)th data directly
If n is odd, then we take mean of 0:5nth and (0:5n) + 1th data
4. Mode:
The most frequent data. (However, no mode if every data only appears once.)
1.2
Dispersion
1. Range:
Range = XLargest XSmallest
2. Interquartile Range:
IQR = Q3 Q1 where Q3 = 0:75(n + 1)th data and Q1 = 0:25(n + 1)th data.
If n + 1 is multiple of 4, then we take 0:75(n + 1)th data and the 0:25(n + 1)th data as
Q3 and Q1 :
If n + 1 is not multiple of 4, then we have to interpolate.
3. Variance:
PN
(Xi
)2
2
Population: = i=1
N
1
Pn
(xi x)2
n 1
4. Standard Deviation
rP
N
)2
i=1 (xi
Population: =
N
sP
n
x)2
i=1 (xi
Sample: s =
n 1
2
Sample: s =
i=1
5. Coe¢ cient of variation: CV =
1.3
s
X
100%
Relationship between two variables
1. Covariance:
Population:
XY
PN
i=1
=
Pn
(xi
X ) (yi
Y)
N
(xi x) (yi y)
Sample: sXY =
n 1
2. Correlation coe¢ cient
XY
Population: XY =
X Y
sXY
Sample: rXY =
sX sY
Note: 1
1 and 1 rXY
1
XY
i=1
2
Probability
Axiom of probability:
1. For any event E, 0 P (E) 1:
P
2. For any event E consisting outcomes O1 ; : : : ; OK , P (E) = K
i=1 P (OK ) :
3. For sample space S, P (S) = 1.
Mutually exclusive events: A and B are mutually exclusive if and only if
P (A \ B) = 0
Collectively exhaustive events: A1 , A2 ,. . . ; AK are collectively exhaustive if
P (A1 [ A2 [ : : : [ AK ) = 1
Complement rule:
P (A) = 1
P A ;P A = 1
P (A)
Odd ratio in favor of A is
Odd (A) =
P (A)
P (A)
=
1 P (A)
P A
Addition rule:
P (A \ B) = P (A) + P (B)
P (A [ B) = P (A) + P (B)
2
P (A [ B)
P (A \ B)
Conditional probability:
P (AjB) =
P (A \ B)
P (A \ B)
; P (BjA) =
P (B)
P (A)
Multiplication rule:
P (A \ B) = P (AjB) P (B) = P (BjA) P (A)
Independence: Event A and B are independent if and only if
P (A \ B) = P (A) P (B)
Note: This implies that event A and B are independent if
P (AjB) = P (A)
P (BjA) = P (B)
Law of total probability: If E1 , E2 ,. . . ; EK are mutually exclusive and collectively exhaustive, then
P (A) = P (A \ E1 ) + P (A \ E2 ) +
+ P (A \ EK )
= P (AjE1 ) P (E1 ) + P (AjE2 ) P (E2 ) +
+ P (AjEK ) P (EK )
Bayes’theorem:
3
P (BjA) =
P (AjB) P (B)
P (A)
P (Ei jA) =
P (AjEi ) P (Ei )
P (AjE1 ) P (E1 ) + P (AjE2 ) P (E2 ) +
+ P (AjEK ) P (EK )
Discrete Random Variable
For a random variable X, probability distribution function is
p (x) = P (X = x)
and the cumulative probability function:
F (x) = P (X
x) =
X
p (x)
a x
Expectation value
E (X) =
Variance:
V ar (X) =
X
X
[x
3
xp (x)
E (X)]2 p (x)
Properties of expectation and variance functions:
X
E (g (X)) =
g (x) p (x)
E (a + bX) = a + bEX
V ar (a + bX) = b2 V arX
Joint probability function for random variables X and Y
p (x; y) = P (X = x; Y = y)
Covariance
Cov (X; Y ) = E [(X E (X)) (Y E (Y ))]
XX
=
[x E (X)] [y E (Y )] p (x; y)
x
y
Correlation
Cov (X; Y )
p
V arX V arY
Properties of expectation and variance functions:
= Corr (X; Y ) = p
E (aX + bY ) = aE (X) + bE (Y )
V ar (aX + bY ) = a2 V arX + b2 V arY + 2abcov (X; Y )
4
Continuous Random Variable
For a random variable X, the cumulative probability function:
X
F (x) = P (X x) =
p (x)
a x
Hence,
P (a < X < b) = F (b)
F (a)
Properties of expectation and variance functions for random variables X and Y
E (a + bX)
V ar (a + bX)
E (aX + bY )
V ar (aX + bY )
=
=
=
=
a + bEX
b2 V arX
aE (X) + bE (Y )
a2 V arX + b2 V arY + 2abcov (X; Y )
If X is normally distributed with mean
X
and variance
N
;
2
, we denote
2
Normal distribution is symmetric about mean, bell-shaped, mean=median=mode.
Theorem: If X N ( ; 2 ), then
Z=
X
N (0; 1)
4
5
Sampling
Let X1 ; X2 ; :::; Xn be random samples from a population with mean
Sample mean
n
1X
Xi
X=
n i=1
and variance
2
.
and standard error of the mean
X
=p
n
Fact: If population is normal, then
2
X
N
;
n
Fact: If poulation is NOT normal, then by central limit theorem, when sample size is
large, then
2
X
6
N
;
n
Estimation
Consider a population parameter and its point estimator ^.
An estimator ^ is unbiased if E ^ = :
Fact: sample mean X is an unbiased estimator of population mean .
Fact: sample variance s2 is an unbiased estimator of population variance 2 .
For two unbiased estimators ^1 and ^2 , estimator ^1 is more e¢ cient if V ar ^1
V ar ^2
Interval estimators:
100(1
) % con…dence interval estimator with known
X
=2 p
Z
2
is
n
where M E = Z =2 pn , U CL = X + Z =2 pn and LCL = X Z =2 pn
100(1
) % con…dence interval estimator with unknown 2 under sample size n and is
X
where M E = tn
s
1; =2 pn ,
U CL = X + tn
tn
s
n
1; =2 p
s
1; =2 pn
5
and LCL = X
tn
s
1; =2 pn
7
Hypothesis Testing
Given population variance 2 , hypothesis testing with
sample of size n and sample mean x.
Known 2
Two-tail Test
Null Hypothesis H0
= 0
Alternative Hypothesis H1
6= 0
z =2 p
X critical values
0
n
x > 0 + z =2 p
n
Decision: Reject if
or x < 0 z =2 p
n
x
p0
test statistics
z=
= n
Z critical values
z =2
z > z =2
Decision: Reject if
or z < z =2
p-value
2P (Z > jzj)
Decision: Reject if
Without knowing population variance 2 , hypothesis
with random sample of size n, sample mean x and sample
Unknown 2
Two-tail Test
Null Hypothesis H0
= 0
Alternative Hypothesis H1
6= 0
s
X critical values
tn 1; =2 p
0
n
s
x > 0 + tn 1; =2 p
n
Decision: Reject if
s
or x < 0 tn 1; =2 p
n
x
p0
t-test statistics
t=
s= n
T critical values
tn 1; =2
t > tn 1; =2
Decision: Reject if
or t < tn 1; =2
p-value
2P (T > jtj)
Decision: Reject if
6
signi…cance level with random
Upper Tail
= 0 or
> 0
0+z p
n
x>
0
z=
+z p
x
p
0
n
Lower Tail
= 0 or
< 0
z p
0
n
x<
0
= n
+z
z>z
z p
0
z=
0
n
x
p0
= n
z
z<
z
P (Z > z)
P (Z < z)
>p
testing with
signi…cance level
standard deviation s2 :
Upper Tail
Lower Tail
= 0 or
= 0 or
0
0
> 0
< 0
s
s
tn 1; p
0 + tn 1; p
0
n
n
x>
0
+ tn
1;
x
p0
s= n
+tn 1;
t=
t > tn
1;
P (T > t)
>p
s
p
n
x<
0
t=
t<
tn
1;
x
p0
s= n
tn 1;
tn
1;
P (T < t)
s
p
n
Related documents