You are on page 1of 3

http://aprendeconalf.

es

Statisticss Formulas
Descriptive Statistics Regression and correlation
Frequencies Linear regression

Sample size n num of individuals in the sample. xi yj ni j
Covariance s x y = x y
n
Absolute frequency n i (num of x i in the sample)
Regression lines :
Relative frequency fi = n i /n
i sx y
Cumulative absolute freq N i = y on x : y = y + (x x )
k =0 n i s x2
Cumulative relative freq Fi = N i /n sx y
x on y : x = x + (y y )
s 2y

Central tendency statistics Regression coefcients


sx y sx y
(y on x ) b y x = (x on y ) b x y =
Mean x =
xi ni s x2 s 2y
n
Median me The value with cum.rel.freq. Fme = 0.5. Coefcient of determination
Mode mo The most frequent value. s x2 y
r2 = 0 r2 1
s x2 s 2y

Position statistics Correlation coefcient


sx y
r = . 1 r 1
Quartiles Q 1 , Q 2 , Q 3 divide the distribution into 4 sx s y
equal parts. Their cum.rel.freqs. are FQ 1 = 0.25,
FQ 2 = 0.5 and FQ 3 = 0.75.
Percentiles P 1 , P 2 , , P 99 divide the distribution into
100 equal parts. Non-linear regression
The cum.rel.freq. is FPi = i /100.
Exponential model y = e a+bx
Apply the logarithm to the dependent variable and
compute the line log y = a + bx .
Dispersion statistics
Logarithmic model y = a + b log x
Apply the logarithm to the independent variable and
Interquartile range I Q R = Q 3 Q 1 compute the line y = a + b log x .
2
(x i x )2 n i xi ni Potential model y = ax b
Variance s 2 = = x 2
n n Apply the logarithm to both variables and compute

Standard deviation s = + s 2 the line log y = a + b log x .
s
Coefcient of variation cv =
| x |

Shape statistics

(x i x )3 fi
Coefcient of skewness g 1 =
s3

(x i x )4 fi
Coefcient of kurtosis g 2 = 3
s4

Linear transformations
Linear transformation y = a + bx
y = a + b x
s y = bs x

x x
Standarization z =
sx

1
http://aprendeconalf.es

Probability Basic probability


Union P (A B) = P (A) + P (B) P (A B)
Event operations
Intersection P (A B) = P (A)P (B |A)
Union Difference P (A B) = P (A) P (A B)

Contrary P (A) = 1 P (A)


A B

Conditional probability
AB P (A B)
Conditional probability P (A |B) =
P (B)
Intersection Independent events P (A |B) = P (A).
Total probability Theorem


n
A B P (B) = P (Ai )P (B |Ai )
i =1
AB Bayes Theorem
P (Ai )P (B |Ai )
P (Ai |B) = n
i =1 P (Ai )P (B |Ai )

Complement


Diagnostic tests
Prevalence Proportion of people with the disease
A A P (D )
Sensitivity P (+ |D )
Specicity P (|D )
Positive Predictive Value (PPV) P (D |+)
Negative Predictive Value (NPV) P (D |)
Difference
P (+ |D )
Positive Likelihood Ratio (LR+)
P (+ |D )
A B P (|D )
Negative Likelihood Ratio (LR-)
P (|D )
AB

Algebra of events Random Variables


Idempotency A A = A, AA =A
Commutative A B = B A, AB =B A
Discrete
Associative (A B) C = A (B C ), (A B) C =
A (B C ) Binomial probability function B(n, p)
Distributive (AB)C = (AC )(B C ), (AB)C = ( )
n x
(A C ) (B C ) f (x ) = p (1 p)nx
x
Neutral element A = A, A=A
Poisson probability function P ()
Absorbing element A = , A = .
Complementary symmetric element A A = , A x
f (x ) = e
A= x!

Double contrary A = A Law of rare events B(n, p) P (np) for n 30 and


p 0.1.
Morgans laws A B = A B, AB =AB

2
http://aprendeconalf.es

Continuous
Normal N (, )
(x ) 2
1
f (x ) = e 2 2
2
Standard normal N (0, 1)
Chi-square 2 (n)
X = Z 12 + + Z n2 ,
where Z i N (0, 1).
Students t T (n)
Z
T = ,
X /n
where Z N (0, 1) and X 2 (n).
Fishers F F (n, m)
X /m
F = ,
Y /n
where X 2 (m) and Y 2 (n).