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 - Nevada

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

 Transparen Toronto Office Locations
Addresses of Transparen Corporation offices in Toronto, Ontario.

 
 High Scalability - Large Systems Optimization
Transparen Corporation lends its expertise to clients experiencing rapid and sudden growth in traffic or server utilization, bottlenecks, systems instability, downtime during peak traffic, or which would like to plan to avoid such issues.

 
 Throughput (or Bandwidth) vs. Latency
This document uses the example of Bill Gates purchasing Google to explain the difference between bandwidth (or throughput) and latency.

 

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
* Alamo * Amargosa Valley * Ash Springs * Austin * Baker * Battle Mountain * Beatty * Beowawe * Blue Diamond * Boulder City * Bunkerville * Cal-Nev-Ari * Caliente * Carlin * Carson City * Cold Springs * Crescent Valley * Crystal * Crystal Bay * Dayton * Delamar Ghost Town * Denio * Duckwater * Dyer * East * Ely * Elko * Empire * Enterprise * Eureka * Fallon * Fernley * Gabbs * Gardnervillle * Gerlach * Glenbrook * Golden Valley * Goldfield * Goodsprings * Hawthorne * Henderson * Imlay * Incline Village * Indian Hills * Indian Springs * Jackpot * Jarbidge * Jean * Jiggs * Johnson Lane * Kingsbury * Las Vegas * Lamoille * Laughlin * Lemmon Valley * Logandale * Lovelock * Lund * McDermitt * McGill * Mesquite * Minden * Moapa Town * Moapa Valley * Montello * Mount Charleston * Nixon * North Las Vegas * Orovada * Overton * Owyhee * Pahrump * Panaca * Paradise * Paradise Valley * Pioche * Rachel * Reno * Round Hill Village * Round Mountain * Sandy Valley * Schurz * Searchlight * Silver Park * Silver City * Silver Springs * Sloan * Smith * Spanish Springs * Sparks * Spring Creek * Spring Valley * Stateline * Summerlin South * Sun Valley * Sunrise Manor * Sutcliffe * Tonopah * Tuscarora * Verdi * Virginia City * Wadsworth * Wells * West Wendover * Winnemucca * Whitney * Winchester * Yerington * Zephyr Cove