Sei sulla pagina 1di 12

The following are the Equations you should know:

1. Probability of type I error


A type I error occurs when one rejects the null hypothesis when it is true. The
probability of a type I error is the level of significance of the test of hypothesis,
and is denoted by *alpha*. Usually a one-tailed test of hypothesis is is used when
one talks about type I error .

Examples:
1- If the cholesterol level of healthy men is normally distributed with a mean of
180 and a standard deviation of 20, and men with cholesterol levels over 225 are
diagnosed as not healthy, what is the probability of a type one error?
z=(225-180)/20=2.25; the corresponding tail area is .0122, which is the probability
of a type I error .

2- If the cholesterol level of healthy men is normally distributed with a mean of


180 and a standard deviation of 20, at what level (in excess of 180) should men be
diagnosed as not healthy if you want the probability of a type one error to be 2%?
2% in the tail corresponds to a z-score of 2.05; 2.05 20 = 41; 180 + 41 = 221.

2. Probability of type II error


A type II error occurs when one rejects the alternative hypothesis (fails to reject
the null hypothesis ) when the alternative hypothesis is true. The probability of a
type II error is denoted by *beta*. One cannot evaluate the probability of a type II
error when the alternative hypothesis is of the form > 180, but often the
alternative hypothesis is a competing hypothesis of the form: the mean of the

alternative population is 300 with a standard deviation of 30, in which case one can
calculate the probability of a type II error.

Examples:
1- If men predisposed to heart disease have a mean cholesterol level of 300 with a
standard deviation of 30, but only men with a cholesterol level over 225 are
diagnosed as predisposed to heart disease , what is the probability of a type II error
(the null hypothesis is that a person is not predisposed to heart disease).
z=(225-300)/30=-2.5 which corresponds to a tail area of .0062, which is the
probability of a type II error (*beta*).

2- If men predisposed to heart disease have a mean cholesterol level of 300 with a
standard deviation of 30, above what cholesterol level should you diagnose men as
predisposed to heart disease if you want the probability of a type II error to be 1%?
(The null hypothesis is that a person is not predisposed to heart disease.)
1% in the tail corresponds to a z-score of 2.33 (or -2.33); -2.33 30 = -70; 300 - 70 = 230.

3. Sensitivity + Specificity

Example:

Where is:
a = true positive test
b = false positive test
c = false negative test
d = true negative test

To calculate the sensitivity we will use the formula:


(
(

)(

)
)

To calculate the specificity we will use the formula:


(
(

)(

)
)

4. Probability
Example:
The probability of a person developing diabetes is and it is independent of but the same as
the probability of that same patient developing hypertension. What is the probability of that
patient developing both diabetes and hypertension?
Probability symbol: P[ ]
Let D = diabetes
[ ]
[

[ ] [ ]

,
,

H = hypertension
[ ]

5. Odds Ration

Where
a = Number of exposed cases
b = Number of exposed non-cases
c = Number of unexposed cases
d = Number of unexposed non-cases

Example
I often think food poisoning is a good scenario to consider when interpreting
ORs: Imagine a group of 20 friends went out to the pub the next day a 7 were
ill. They suspect that it may have been something they ate, maybe the fish
casserole here are the numbers:

Exposed (ate fish )


Unexposed (didn't eat fish

Cases (ill)
5
2
7

Control (not ill)


3
10
13

Total
8
12
20

- Odds of exposure in cases = a/c = 5/2 = 2.5


- Odds of exposure in controls = b/d = 3/10 = 0.3
- Odds Ratio = (a/c) / (b/d) = 2.5/0.3 = 8.33

6. Chi-square

Here,
O = Observed frequency
E = Expected frequency

= Summation
= Chi Square value
Question 1: Calculate the chi-square value, if observed frequency is 8 and expected
frequency is 15?

Solution:
Observed frequency = 8
Expected frequency = 15

Chi Square value = 3.267

Question 2: Calculate the chi-square value for the following data.


Color

Red Green Yellow

Observed frequency 12

16

20

Expected frequency 16

25

Solution:
Lets find the Chi Square value for the given data using the formula :

First, lets calculate (


Red color
Green color
Yellow color

) for each color.

)
(

(
)

)
(

)
(

Chi-Square value for Red color

)
(

Chi-Square value for Green color


Chi-Square value for Yellow color

)
(

)
(

So, the chi-square value for the given data is = 1 + 8 + 1 = 10


Chi Square value = 10

7. T-test

Where,

= Mean of first set of values


= Mean of second set of values
S1 = Standard deviation of first set of values
S2 = Standard deviation of second set of values
n1 = Total number of values in first set
n2 = Total number of values in second set.
The formula for standard deviation is given by:

Question 1: Find the t-test value for the following two sets of values:
7, 2, 9, 8 and 1, 2, 3, 4?
Solution:
Formula for mean:

Formula for standard deviation:

Calculation for first set:


Number of terms in first set:
n1 = 4

Mean for first set of data:

= 6.5
Construct the following table for standard deviation:

x1
7
2
9
8

0.5
-4.5
2.5
1.5

)
0.25
20.25
6.25
2.25
) = 29

Standard deviation for first set of data:


S1 = 3.11
Calculation for second set:
Number of terms in second set:
n2 = 4
Mean for second set of data:

= 2.5

Construct the following table for standard deviation:


)
x2 (
-1.5
1
-0.5
2
0.5
3
1.5
4

)
2.25
0.25
0.25
2.25

) =5

Standard deviation for first set of data :


S2 = 1.29
Formula for t-test value:

t = 2.3764 = 2.38 (approx)

8. Z-test

Where,
x = Standardized random variable

= Mean of the data


= Population standard deviation.

The formula for population standard deviation is given below:

Where,
= Population standard deviation
= Numbers given in the data

= Mean of the data


n = Total number of items.

Question 1: In a government organization, the mean basic salary of the employees is


INR 5000. How much will be the z score of employees whose basic salary is INR
3000, if standard deviation of the population is 850?

Solution:
Standardized random variable x = 3000
Mean = 5000
Population standard deviation

= 850

Formula for Z score is given below:

= - 2.353

Question 2: The marks obtained in mathematics exam by students of a class vary


from 33 to 100. If average marks are 62 and standard deviation is 20. Find the Z score
for students who scored 80?

Solution:
Standardized random variable x = 80
Mean = 62
Population standard deviation

= 20

Formula for Z score is given below:

= 0.9

9. Mean & Expected values


Given a random variable X with values x1, x2, x3, . . . xn, and respective probabilities
of p1, p2, p3, . . . pn, the expected value of X is given by the formula:

E(X) = x1p1 + x2p2 + x3p3 + . . . + xnpn.


E(X) = expected value
X = random variable
x= values of random variable
p= probabilities

Example:
Flip a coin three times and let X be the random variable of the number of heads. This
has probability distribution of 1/8 for X = 0, 3/8 for X = 1, 3/8 for X = 2, 1/8 for X =
3. Use the expected value formula to obtain:
E(X) = (1/8)0 + (3/8)1 + (3/8)2 + (1/8)3 = 12/8 = 1.5

10.standard deviation
The sample standard deviation formula is:

where,
s = sample standard deviation
= sum of...
= sample mean
n = number of scores in sample.

The population standard deviation formula is:

where,
= population standard deviation
= sum of...
= population mean
n = number of scores in sample.

Potrebbero piacerti anche