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

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.

 

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
* Adrian * Advance * Alba * Albany * Alexandria * Allendale * Alma * Altenburg * Alton * Amazonia * Amoret * Amsterdam * Anderson * Annapolis * Anniston * Appleton City * Arbyrd * Arcadia * Archie * Argyle * Armstrong * Arnold * Asbury * Ash Grove * Ashland * Atlanta * Augusta * Aurora * Auxvasse * Ava * Avondale * Bagnell * Ballwin * Baring * Barnard * Barnett * Bates City * Battlefield * Bella Villa * Bell City * Belle * Bellefontaine Neighbors * Bellflower * Belton * Benton * Berger * Berkeley * Bernie * Bertrand * Bethany * Beverly Hills * Bevier * Billings * Birch Tree * Bismarck * Blackburn * Black Jack * Blackwater * Blairstown * Bland * Bloomfield * Bloomsdale * Blue Springs * Bogard * Bolckow * Bolivar * Bonne Terre * Boonville * Bosworth * Bourbon * Bowling Green * Bragg City * Brandsville * Branson * Branson West * Brashear * Braymer * Breckenridge * Breckenridge Hills * Brentwood * Bridgeton * Bronaugh * Brookfield * Browning * Brownington * Brunswick * Bucklin * Buckner * Buffalo * Bunceton * Bunker * Burlington Junction * Butler * Byrnes Mill * Cabool * Cainsville * Calhoun * California * Callao * Camden * Camden Point * Camdenton * Cameron * Campbell * Canalou * Canton * Cape Girardeau * Cardwell * Carl Junction * Carrollton * Carterville * Carthage * Caruthersville * Carytown * Cassville * Catron * Center * Centerview * Centerville * Centralia * Chaffee * Chamois * Charlack * Charleston * Chesterfield * Chilhowee * Chillicothe * Chula * Clarence * Clark * Clarksburg * Clarksdale * Clarkson Valley * Clarksville * Clarkton * Clayton * Clearmont * Cleveland * Clever * Clifton Hill * Clinton * Coffey * Cole Camp * Collins * Columbia * Commerce * Conception Junction * Concordia * Conway * Cool Valley * Cooter * Corder * Cottleville * Country Club Hills * Cowgill * Craig * Crane * Creighton * Crestwood * Creve Coeur * Crocker * Cross Timbers * Crystal City * Crystal Lake Park * Crystal Lakes * Cuba * Curryville * Darlington * Dearborn * Deepwater * De Kalb * Dellwood * Delta * Des Arc * Desloge * De Soto * Des Peres * De Witt * Dexter * Diamond * Dixon * Doniphan * Doolittle * Downing * Drexel * Dudley * Duenweg * Eagleville * East Lynne * Easton * East Prairie * Edgar Springs * Edgerton * Edina * Edmundson * Eldon * El Dorado Springs * Ellington * Ellisville * Ellsinore * Elmer * Elmo * Elsberry * Eminence * Emma * Essex * Ethel * Eureka * Everton * Ewing * Excelsior Estates * Excelsior Springs * Exeter * Fairfax * Fair Grove * Fair Play * Fairview * Farber * Farmington * Fayette * Fenton * Ferguson * Festus * Fillmore * Fisk * Fleming * Flint Hill * Flordell Hills * Florissant * Foley * Fordland * Forest City * Foristell * Forsyth * Frankford * Franklin * Fredericktown * Freeman * Fremont Hills * Frohna * Frontenac * Fulton * Gainesville * Galena * Gallatin * Galt * Garden City * Gasconade * Gerald * Gideon * Gilliam * Gilman City * Gladstone * Glasgow * Glenaire * Glendale * Golden City * Goodman * Gower * Graham * Grain Valley * Granby * Grandin * Grandview * Grant City * Greencastle * Green City * Greendale * Greenfield * Green Park * Green Ridge * Greentop * Greenville * Greenwood * Hale * Hallsville * Hamilton * Hannibal * Hardin * Harris * Harrisonville * Hartville * Hawk Point * Hayti * Hayti Heights * Hazelwood * Henrietta * Herculaneum * Hermann * Hermitage * Higbee * Higginsville * High Hill * Highlandville * Hillsboro * Holcomb * Holden * Holland * Hollister * Holt * Holts Summit * Homestown * Hopkins * Hornersville * Houston * Houstonia * Houston Lake * Howardville * Humansville * Hume * Hunnewell * Huntleigh * Huntsville * Hurdland * Hurley * Iberia * Independence * Irondale * Iron Mountain Lake * Ironton * Jackson * Jamesport * Jamestown * Jasper * Jefferson City * Jennings * Jonesburg * Joplin * Kahoka * Kansas City * Kearney * Kennett * Keytesville * Kidder * Kimberling City * Kimmswick * King City * Kingston * Kingsville * Kinloch * Kirbyville * Kirksville * Kirkwood * Knob Noster * Knox City * Koshkonong * La Belle * Laclede * Laddonia * Ladue * La Grange * Lake Annette * Lake Lafayette * Lake Lotawana * Lake Ozark * Lake St. Louis * Lakeshire * Lakeside * Lake Tapawingo * Lake Waukomis * Lake Winnebago * Lamar * La Monte * Lanagan * Lancaster * La Plata * Laredo * La Russell * Lathrop * Lawson * Leadington * Leadwood * Leawood * Lebanon * Lee's Summit * Leeton * Levasy * Lexington * Lewistown * Liberal * Liberty * Licking * Lilbourn * Lincoln * Linn * Linn Creek * Linneus * Lockwood * Lohman * Lone Jack * Louisiana * Lowry City * Lupus * Macks Creek * Macon * Madison * Maitland * Malden * Malta Bend * Manchester * Mansfield * Maplewood * Marble Hill * Marceline * Marionville * Marquand * Marshall * Marshfield * Marston * Marthasville * Martinsburg * Maryland Heights * Maryville * Matthews * Maysville * Mayview * McFall * McKittrick * Meadville * Memphis * Mendon * Mercer * Meta * Mexico * Miami * Middletown * Milan * Miller * Mindenmines * Miner * Missouri City * Moberly * Mokane * Moline Acres * Monett * Monroe City * Montgomery City * Montrose * Morehouse * Morley * Morrison * Morrisville * Mosby * Moscow Mills * Mound City * Mountain Grove * Mountain View * Mount Vernon * Napoleon * Naylor * Neck City * Neelyville * Nelson * Neosho * Nevada * New Bloomfield * Newburg * New Cambria * New Florence * New Franklin * New Hampton * New Haven * New London * New Madrid * Newtown * Niangua * Nixa * Noel * Norborne * Normandy * North Kansas City * Northmoor * Northwoods * Norwood * Novelty * Novinger * Oak Grove * Oakland * Odessa * O'Fallon * Old Monroe * Olivette * Olympian Village * Oran * Oregon * Oronogo * Orrick * Osage Beach * Osborn * Osceola * Otterville * Overland * Owensville * Ozark * Pacific * Pagedale * Palmyra * Paris * Park Hills * Parkville * Parma * Parnell * Pasadena Hills * Pattonsburg * Peculiar * Perry * Perryville * Pevely * Piedmont * Pierce City * Pilot Grove * Pilot Knob * Pine Lawn * Pineville * Platte City * Platte Woods * Plattsburg * Pleasant Hill * Pleasant Hope * Pleasant Valley * Polo * Poplar Bluff * Portage Des Sioux * Portageville * Potosi * Powersville * Prairie Home * Princeton * Purcell * Purdin * Purdy * Puxico * Queen City * Quitman * Qulin * Randolph * Ravenwood * Raymore * Raytown * Rea * Reeds * Reeds Spring * Republic * Rich Hill * Richland * Richmond * Richmond Heights * Ridgeway * Risco * Riverside * Rocheport * Rockaway Beach * Rock Hill * Rock Port * Rockville * Rogersville * Rolla * Rosebud * Rosendale * Russellville * Saint Ann * Saint Charles * Saint Clair * Saint George * Saint James * Saint John * Saint Joseph * Saint Louis * Saint Martins * Saint Mary * Saint Paul * Saint Peters * Saint Robert * Saint Thomas * Sainte Genevieve * Salem * Salisbury * Sarcoxie * Savannah * Schell City * Scott City * Sedalia * Seligman * Senath * Seneca * Seymour * Shelbina * Shelbyville * Sheldon * Sheridan * Shrewsbury * Sikeston * Skidmore * Slater * Smithton * Smithville * South Gorin * Sparta * Spickard * Springfield * Squires * Stanberry * Steele * Steelville * Stewartsville * Stockton * Stotts City * Stoutland * Stover * Strafford * Strasburg * Sturgeon * Sugar Creek * Sumner * Sunrise Beach * Sullivan * Summersville * Sunset Hills * Sweet Springs * Syracuse * Tallapoosa * Taos * Tarkio * Thayer * Tipton * Town and Country * Tracy * Tecumseh * Tindall * Trenton * Trimble * Triplett * Troy * Truesdale * Union * Union Starr * Unionville * University City * Urbana * Urich * Valley Park * Van Buren * Vandalia * Velda City * Verona * Versailles * Viburnum * Vienna * Vinita Park * Waco * Walker * Walnut Grove * Wardell * Warrensburg * Warrenton * Warsaw * Warson Woods * Washburn * Washington * Wasola * Waverly * Wayland * Waynesville * Weatherby Lake * Weaubleau * Webb City * Webster Groves * Weldon Spring * Wellington * Wellston * Wellsville * Wentzville * West Alton * Westboro * Weston * Westphalia * West Plains * Wheatland * Wheaton * Wheeling * Wildwood * Willard * Williamsville * Willow Springs * Winchester * Windsor * Winfield * Winona * Woods Heights * Woodson Terrace * Wright City * Wyaconda * Wyatt