Select your font size 
 
about us products & services consulting & support news & events contact us
Paul Meagher gives an example of calculating conditional probability using the set enumeration method.

Conditional probability - Quebec

print this article 
 
1

A conditional probability refers to the probability of observing an event A given that you have observed a separate event B. The mathematical shorthand for expressing this idea is:

P(A | B)

Imagine that A refers to "customer buys product A" and B refers to "customer buys product B". P(A | B) would then read as the "probability that a customer will buy product A given that they have bought product B." If A tends to occur when B occurs, then knowing that B has occurred allows you to assign a higher probability to A's occurrence than in a situation in which you did not know that B occurred.

More generally, if A and B systematically co-vary in some way, then P(A | B) will not be equal to P(A). Conversely, if A and B are independent events, then P(A | B) would be expected to equal P(A).

The need to compute a conditional probability thus arises any time you think the occurence of some event has a bearing on the probability of another event's occurring.

The most basic and intuitive method for computing P(A | B) is the set enumeration method. Using this method, P(A | B) can be computed by counting the number of times A and B occur together {A & B} and dividing by the number of times B occurs :

P(A | B) = {A & B} /

If you observe that 12 customers to date bought product B and of those 12, 10 also bought product A, then P(A | B) would be estimated at 10/12 or 0.833. In other words, the probability of a customer buying product A given that they have purchased product B can be estimated at 83 percent by using a method that involves enumerating relative frequencies of A and B events from the data gathered to date.

You can compute a conditional probability using the set enumeration method with the following PHP code:

Listing 1. Computing conditional probability using set enumeration


Page: 1 2 3 4 5 6 7 8 9 10 11 Next Page: Learning from experience

 

The content shown in this page was first published by IBM developerWorks and is reprinted with permission from Paul Meagher (www.datavore.com)

 


Most Recent Website and Regional Updates

 Research Tools
Measure human resource allocation and collect data with the goal of determining patterns that will bring forward actionable insights which may lead to policy changes, saving money and improving quality of service.

 
 Process Evaluation Questions
Questions to help focus discussion about process improvement

 
 Operations Research
Operations Research (frequently called OR), is the methodical study of how to do things better. It is also called Optimization Theory.

 
 Our Role in Operations Optimization
Meet objectives more efficiently by improving operational effectiveness and profitability.

 
 Monte Carlo Method
Short description of the Monte Carlo Method in optimization theory.

 
 Introduction to Markov Process
Introduction to Markov Chains and Markov Processes, with a link to an introductory PDF which provides essential details about Markov analysis, along with helpful examples and exercises.

 
 Windows PC Tech Support Price Calculator
Transparen offers first-class Windows PC and Linux PC tech support services based on a number of factors such as a count of supported desktops.

 
 21/11/2008: Somali Pirates
Earlier this week, a giant Saudi oil tanker became the largest vessel ever hijacked by pirates operating with near impunity off the coast of Somalia. Today on the Current podcast, we'll have an interview with the head of one of the pirate groups operating in the area.

 
 20/11/2008: Juice Box Investigation
How a tainted juice box led one family on a convoluted quest for answers about their children's health.

 
 19/11/2008: Intimidation by Pharmaceutical Companies
Doctors sometimes discover that the drugs they're prescribing can be more harmful to some of their patients than the diseases they treat. But as CBC Radio health reporter Pauline Dakin tells the Current, some doctors say they've been intimidated by pharmaceutical companies into keeping their suspicions and their research quiet.

 

Google
 
Web transparen.com

Contact Information

Related Information

 
   
 
E C M | © 2003-2007 Transparen Corp.      

Standardized Services: Data Recovery Service / Creative Services / Premium Web Hosting Services / System Administration Tech Support Services
Recent Projects: Full-Service Mortgage and Financing Company / System to manage flights from Vancouver to Tofino / Photo exchange verification service
Our Vancouver BC Server Proudly Hosts: automated parking and revenue control systems, leafside lane at southlands, cost effective alternative power sources, Higher Grade Learning Centres, pacific forage bag supply, sunburst medical, neosonic design, roger mahler photography - passionate, intriguing, desirable, the connection between east and west, affordable flights to victoria and tofino, low interest mortgage brokers in vancouver, richmond, surrey, toronto, Toronto Calgary and Vancouver IT staffing and talent search
* Acton Vale * Alma * Amos * Amqui * Asbestos * Baie-Comeau * Baie-Saint-Paul * Barkmere * Beauceville * Beauharnois * Beaupré * Bécancour * Bedford * Belleterre * Beloeil * Berthierville * Blainville * Boisbriand * Bois-de-Filion * Bonaventure * Bromont * Brownsburg-Chatham * Cabano * Candiac * Cap-Chat * Cap-Santé * Carignan * Carleton-Saint-Omer * Causapscal * Chambly * Chandler * Chapais * Charlemagne * Châteauguay * Château-Richer * Chibougamau * Clermont * Coaticook * Contrecoeur * Cookshire-Eaton * Cowansville * Danville * Daveluyville * Dégelis * Delson * Desbiens * Deux-Montagnes * Disraeli * Dolbeau-Mistassini * Donnacona * Drummondville * Dunham * Duparquet * East Angus * Farnham * Fermont * Forestville * Fossambault-sur-le-Lac * Gaspé * Gatineau * Gracefield * Granby * Grande-Rivière * Hudson * Huntingdon * Joliette * Kingsey Falls * Lac-Brome * Lac-Delage * Lachute * Lac-Mégantic * Lac-Saint-Joseph * Lac-Sergent * La Malbaie * La Pocatière * La Prairie * La Sarre * L'Assomption * La Tuque * Laval * Lavaltrie * Lebel-sur-Quévillon * L'Épiphanie * Léry * Lévis * L'Île-Cadieux * L'Île-Perrot * Longueuil * Lorraine * Louiseville * Magog * Malartic * Maniwaki * Marieville * Mascouche * Matagami * Matane * Mercier * Métabetchouan- Lac-à-la-Croix * Métis-sur-Mer * Mirabel * Mont-Joli * Mont-Laurier * Montmagny * Montreal - largest city * Mont-Saint-Hilaire * Mont-Tremblant * Murdochville * Neuville * New Richmond * Nicolet * Normandin * Notre-Dame-de-l'Île-Perrot * Notre-Dame-du-Lac * Otterburn Park * Paspébiac * Percé * Pincourt * Plessisville * Pohénégamook * Port-Cartier * Pont-Rouge * Portneuf * Prévost * Princeville * Quebec - provincial capital * Repentigny * Richelieu * Richmond * Rimouski * Rivière-du-Loup * Rivière-Rouge * Roberval * Rosemère * Rouyn-Noranda * Saguenay * Saint-Basile * Saint-Basile-le-Grand * Saint-Césaire * Saint-Constant * Sainte-Adèle * Sainte-Agathe-des-Monts * Sainte-Anne-de-Beaupré * Sainte-Anne-des-Monts * Sainte-Anne-des-Plaines * Sainte-Catherine * Sainte-Catherine-de- la-Jacques-Cartier * Sainte-Julie * Sainte-Marguerite-Estérel * Sainte-Marie * Sainte-Marthe-sur-le-Lac * Sainte-Thérèse * Saint-Eustache * Saint-Félicien * Saint-Gabriel * Saint-Georges * Saint-Hyacinthe * Saint-Jean-sur-Richelieu * Saint-Jérôme * Saint-Joseph-de-Beauce * Saint-Joseph-de-Sorel * Saint-Lazare * Saint-Lin-Laurentides * Saint-Marc-des-Carrières * Saint-Ours * Saint-Pamphile * Saint-Pascal * Saint-Pie * Saint-Raymond * Saint-Rémi * Saint-Sauveur * Saint-Tite * Salaberry-de-Valleyfield * Schefferville * Scotstown * Senneterre * Sept-Îles * Shawinigan * Sherbrooke * Sorel-Tracy * Stanstead * Sutton * Témiscaming * Terrebonne * Thetford Mines * Thurso * Trois-Pistoles * Trois-Rivières * Valcourt * Val-d'Or * Varennes * Vaudreuil-Dorion * Victoriaville * Ville-Marie * Warwick * Waterloo * Waterville * Windsor