Anda di halaman 1dari 6

Contingency tables

A contingency table is another tool for keeping a record of the counts or percentages in a
probability problem. Contingency tables are especially helpful for figuring out whether events
are dependent or independent.
We will be studying two-way contingency tables, where we count the number of outcomes for 2
events and their complements, making 4 events in total. A two-way contingency table always
shows the counts for the 4 possible combinations of events, as well as the totals for each event
and its complement. We can use a contingency table to compute the probabilities of various
events by computing the ratios between counts, and to determine whether the events are
dependent or independent. he e!ample below shows a two-way contingency table, representing
the outcome of a medical study.
Example 1: Contingency tables
Question
A medical trial into the effectiveness of a new medication was carried out. "2# females and $#
males took part in the trial. %ut of those people, &# females and '# males responded positively to
the medication. (iven below is a contingency table with the given information filled in.
FemaleMaleTotals
Positive &# '#
Negative
Totals "2# $#
able "
". What is the probability that the medicine gives a positive result for females)
2. What is the probability that the medicine gives a negative result for males)
'. Was the medication*s success independent of gender) +!plain.
Answer
Complete te contingency table
he best place to start is always to complete the contingency table. ,ecause the each column has
to sum up to its total, we can work out the number of females and males who responded
negatively to the medication. hen we can add each row to get the totals on the right hand side of
the table.
FemaleMaleTotals
Positive &# '# -#
Negative.# /# "'#
Totals "2# $# 2"#
able 2
Compute te re!uire" probabilities
he way the first 0uestion is phrased, we need to determine the probability that a person
responds positively if she is female. his means that we do not include males in this calculation.
1o, the probability that the medicine gives a positive result for females is the ratio between the
number of females who got a positive response and the total number of females.
1imilarly, the probability that the medicine gives a negative result for males is2
#n"epen"ence
We need to determine whether the effect of the medicine and the gender of a participant are
dependent or independent. According to the definition, two events are independent if and only if
We will look at the events that a participant is female and that
the participant responded positively to the trial.
3rom these probabilities we can see that
and therefore the gender of a participant
and the outcome of a trial are dependent events.
Example $: Contingency tables
Question
4se the contingency table below to answer the following 0uestions.
%ra"e 11 %ra"e 1$ Totals
&as cellpone &$ &# "#$
No cellpone / ' $
Totals /& &' ""-
able '
". What is the probability that a learner from (rade "" has a cellphone)
2. What is the probability that a learner who does not have a cellphone is from (rade "".
'. Are the grade of a learner and whether he has a cellphone or not independent events)
+!plain your answer.
Answer
". here are /& learners in (rade "" and &$ of them have a cellphone. herefore the
probability that a learner from (rade "" has a cellphone is .
2. here are $ learners who do not have a cellphone and / of them are in (rade "".
herefore the probability that a learner who does not have a cellphone is from from
(rade "" is .
'. o test for independence, we will consider whether a learner is in (rade "" and whether a
learner has a cellphone. he probability that a learner is in (rade "" is . he
probability that a learner has a cellphone is . he probability that a learner is in (rade
"" and has a cellphone is . 1ince the grade of a learner and
whether he has a cellphone are dependent. ))
Exercise 1: Contingency tables
5roblem "2
4se the contingency table below to answer the following 0uestions.
,rown eyes 6ot brown eyes otals
,lack hair &# '# -#
7ed hair .# -# "&#
otals "2# ""# 2'#
able 4
". What is the probability that someone with black hair has brown eyes)
2. What is the probability that someone has black hair)
'. What is the probability that someone has brown eyes)
4. Are having black hair and having brown eyes dependent or independent events)
Answer "2
". -# people have black hair and of those, &# people also have brown eyes. herefore the
probability that someone with black hair has brown eyes is .
Note: this is different from asking for the probability of having black hair and brown
eyes. 8his probability is computed in part 8d9 below.9 he 0uestion was phrased to ask
for the probability of having brown eyes given that a person has black hair.
2. %ut of a total of 2'#, -# have black hair. herefore the probability that someone has
black hair is .
'. %ut of a total of 2'#, "2# have brown eyes. herefore the probability that someone has
brown eyes is .
4. We already computed that the probability of having
o black hair is : and
o brown eyes is .
1ince &# out of 2'# people have black hair and brown eyes, the probability of having
black hair and brown eyes is .
We conclude that having black hair and brown eyes are dependent events since
.
5roblem 22
(iven the following contingency table, identify the events and determine whether they are
dependent or independent.
;ocation A ;ocation , otals
,uses left late "& 4# &&
,uses left on time 2& 2# 4&
otals 4# /# "##
able &
Answer 22
he events are whether a bus leaves from ;ocation A or not and whether a bus left late or not.
We test whether the ;ocation A and the left late events are independent. he total number of
buses in the contingency table is "##. We determine the probabilities of the different events from
the values in the table <
leaving from ;ocation A2 :
leaving late2 :
leaving from ;ocation A and leaving late2 .
1ince , the events are dependent.
5roblem '2
=ou are given the following information.
+vents and are independent.
.
.
Complete the contingency table below.
not otals

not
otals &#
able /
Answer '2
3rom the given table, we see that the total number of outcomes is &#. 1ince we
have and . 1ince we have
and . 3rom this we can partially complete the
table2
not otals
2#
not '#
otals '& "& &#
able .
6e!t, we use the fact that and are independent. 3rom the definition of independence
herefore
. We find the rest of the values in the table by making sure
that each row and column sums to its total.
not otals
"4 / 2#
not 2" $ '#
otals '& "& &#
able -
5revious > 4p > 6e!t
?ome 22 (rade "" @athematics 22 5robability 22 Contingency tables
3ull 1ite

Anda mungkin juga menyukai