<< Chapter < Page Chapter >> Page >

We utilize the ratio form of Bayes' rule to calculate the posterior odds

P ( G 1 | E ) P ( G 2 | E ) = P ( E | G 1 ) P ( E | G 2 ) · P ( G 1 ) P ( G 2 )

If the ratio is greater than one, classify in group 1; otherwise classify in group 2 (we assume that a ratio exactly one is so unlikely that we can neglect it). Because ofconditional independence, we are able to determine the conditional probabilities

P ( E | G 1 ) = 42 · 27 · 15 · 44 · 22 · 15 · 52 · 3 · 48 · 12 69 10 and
P ( E | G 2 ) = 29 · 37 · 33 · 18 · 23 · 5 · 17 · 5 · 24 · 5 56 10

The odds P ( G 1 ) / P ( G 2 ) = 69 / 56 . We find the posterior odds to be

P ( G 1 | E ) P ( G 2 | E ) = 42 · 27 · 15 · 44 · 22 · 15 · 52 · 3 · 48 · 12 29 · 37 · 33 · 18 · 23 · 5 · 17 · 5 · 24 · 5 · 56 9 69 9 = 5 . 85

The factor 56 9 / 69 9 comes from multiplying 56 10 / 69 10 by the odds P ( G 1 ) / P ( G 2 ) = 69 / 56 . Since the resulting posterior odds favoring Group 1 is greater than one, we classify the respondent in group 1.

While the calculations are simple and straightforward, they are tedious and error prone. To make possible rapid and easy solution, say in a situation where successive interviews areunderway, we have several m-procedures for performing the calculations. Answers to the questions would normally be designated by some such designation as Y for yes, N forno, and U for uncertain. In order for the m-procedure to work, these answers must be represented by numbers indicating the appropriate columns in matrices A and B . Thus, in the example under consideration, each Y must be translated into a 1, each N into a 2, and eachU into a 3. The task is not particularly difficult, but it is much easier to have MATLAB make the translation as well as do the calculations.The following two-stage approach for solving the problem works well.

The first m-procedure oddsdf sets up the frequency information. The next m-procedure odds calculates the odds for a given profile. The advantage of splitting into two m-procedures is that we can set up the data once, then callrepeatedly for the calculations for different profiles. As always, it is necessary to have the data in an appropriate form. The following is an example in which thedata are entered in terms of actual frequencies of response.

% file oddsf4.m % Frequency data for classificationA = [42 22 5; 34 27 8; 15 45 9; 19 44 6; 22 43 4;      41 13 15; 9 52 8; 40 26 3; 48 12 9; 20 37 12]; B = [20 31 5; 16 37 3; 33 19 4; 31 18 7; 23 28 5;     14 37 5; 31 17 8; 13 38 5; 27 24 5; 35 16 5];disp('Call for oddsdf')

Classification using frequency data

oddsf4              % Call for data in file oddsf4.m Call for oddsdf     % Prompt built into data fileoddsdf              % Call for m-procedure oddsdf Enter matrix A of frequencies for calibration group 1  AEnter matrix B of frequencies for calibration group 2  B Number of questions = 10Answers per question = 3  Enter code for answers and call for procedure "odds"y = 1;              % Use of lower case for easier writing n = 2;u = 3; odds                % Call for calculating procedureEnter profile matrix E  [y n y n y u n u y u]   % First profileOdds favoring Group 1:   5.845 Classify in Group 1odds                % Second call for calculating procedure Enter profile matrix E  [n n u n y y u n n y]   % Second profile Odds favoring Group 1:   0.2383Classify in Group 2 odds                % Third call for calculating procedureEnter profile matrix E  [y y n y u u n n y y]   % Third profileOdds favoring Group 1:   5.05 Classify in Group 1

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask