Professional Documents
Culture Documents
BIOSTATISTIC
S
Presented by:
Reynald Dizon.,RN
Benjelyn Joy Campos.,RPh
TOPIC:
Testing of Relationship of
Nominal data and chi
square.
• INTRODUCTION
• TEST OF
INDEPENDENCE
TOPIC:
Attended
Skipped
FAILED
Attended
Skipped
PASS
PASS
6%
FAILED
25%
8%
15%
Whether attending
class influences how
students perform on
an exam
How to Analyze Nominal Data?
Although nominal data cannot be treated using mathematical
operators, they still can be analyzed using advanced statistical
methods.
• The chance
• Applied when you have one categorical variable from
single population
• Used to determine whether the sample is consistent
with a hypothesized distribution
• The expected value of the number of sample
observation in each level of the variable is atleast 5
Chi-Square as a Statistical Test
Pass Failed
Attended 25 6
Skipped 8 15
Another way to describe the Chi-square test is that it
tests the null hypothesis that the variables are
independent. The test compares the observed data
to a model that distributes the data according to the
expectation that the variables are independent.
Wherever the observed data doesn't fit the model,
the likelihood that the variables are dependent
becomes stronger, thus proving the null
hypothesis incorrect!
Example
Without
With Master’s
Master’s
Degree
Degree
Male 20 30
Female 30 20
Male 20 30 50
Female 30 20 50
Total 50 50 100
Male 25 25 50
Female 25 25 50
Total 50 50 100
No 71.1 % 71.1%
No 83.3 % 57.2%
Expected frequencies fe
the cell frequencies that would be expected in a bivariate
table if the two tables were statistically independent.
Observed frequencies fo
the cell frequencies actually observed in a bivariate table.
The Concept of Expected Frequencies
Chi-Square (obtained)
The test statistic that summarizes the differences between
the observed (fo) and the expected (fe) frequencies in a
bivariate table.
Calculating the Obtained Chi-Square
( fe fo ) 2
2
fe
fe = expected frequencies
fo = observed frequencies
Chi Square distribution
df = (r – 1)(c – 1)
where
r = the number of rows
c = the number of columns
Calculating Degrees of Freedom
(3 – 1)(2 – 1) = 2
2 degrees of freedom
The Chi-square Formula
Sum
EXAMP
LES
Example of GOODNESS AND FIT TEST
Eg. I was about to buy a restaurant and I ask my friend who is also a restaurant owner of the
level of customers each day and he said the following data Monday 30 people which we expect
in 10%,Tuesday 14 which we expect 10%, weds 34, which we expect to be 15%, Thursday 45
which we expect 20%,Friday 57 which is 30% and sat 20 which we expect to be 15% of the sales
• and soooo on
5
CHI SQUARE= 11.435/11.44
LOOK FOR THE
DF=DEGREES OF FREEDOM
6 DAYS-1
DF=5
LEVEL OF SIGNIFICANCE
<0.05
��^2= 11.071
REJECTION VALUE
>0.05
Critical value=11.071
Chi square=11.44
11.44>11.07
Thus we reject our null hypothesis
Another way to describe the Chi-square test is that it tests
the null hypothesis that the variables are independent.
The test compares the observed data to a model that
distributes the data according to the expectation that the
variables are independent. Wherever the observed data
doesn't fit the model, the likelihood that the variables are
dependent becomes stronger, thus proving the null
hypothesis incorrect!
• evaluates the relationship between two
variables
• nonparametric test that is performed on
categorical (nominal or ordinal data)
df = (rows – 1)(column – 1)
df = (2 – 1)(3 – 1)
df = (1)(2) = 2
State Decision Rule