function [] = chap_3_prob_36() % % Written by: % -- % John L. Weatherwax 2006-08-28 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- format rat; n_employees = [ 50, 75, 100 ]; tot_employees = sum(n_emp); % probability of each store (A,B,C): p_store = n_employees / tot_employees; % probability a woman resigns given each store: p_w_given_store = [ 0.5, 0.6, 0.7 ]; % joint probability a woman resigns from each store: p_w_N_store = p_w_given_store .* p_store; % probability that person resigns from store C given the person is a woman: p_C_given_w = p_w_N_store(3) / sum( p_w_N_store )