Select your font size 
 
about us products & services consulting & support news & events contact us
Paul Meagher introduces Bayesian inference by discussing the basic mathematical concepts and demonstrating how to implement the underlying conditional probability calculations using PHP.

Understanding Bayes Using PHP - New Brunswick

print this article 
 

Conditional probability -- the probability of observing one event as a result of having observed another event -- is a potentially important factor in designing intelligent Web applications. Paul Meagher (www.datavore.com) introduces Bayesian inference by discussing the basic mathematical concepts involved and demonstrating how to implement the underlying conditional probability calculations using PHP. In this article, the author discusses how Bayesian inference can be used to build an online PHP-based wizard that guides a user through the process making a medical diagnosis. This three-part series features interesting applications designed to help you appreciate the power and potential of Bayesian inference concepts.


If you examine current artificial intelligence, statistics, and data-mining journals, books, and conferences, you will notice that Bayesian inference techniques are being applied to increasingly complex problems in a growing number of application areas. Many Web developers, however, lack a constructive understanding of Bayesian inference and this prevents them from utilizing these techniques in their own software-development practice. This article, the first of three, aims to provide web developers with some necessary background.

For a Web developer, a constructive understanding of Bayesian inference means that you are able to see how Bayesian inference can be applied to the Web development problems you are facing. To achieve this level of understanding, a developer cannot be content to simply study a few examples of how the relevant math formulas work; he must also:

  1. See how these math formulas might be distilled into software routines
  2. Determine how these mathematical software routines can be integrated into interesting Web applications
In mathematics, we are usually concerned with declarative, or "what is", descriptions, whereas in computer science we are usually concerned with imperative, or "how to", descriptions. -- Abelson, Sussman, and Sussman in Structure and Interpretation of Computer Programs, p.22

Bayesian inference techniques have been widely used in developing various types of Artifical Intelligence (AI) systems, for instance for text retrieval, classification, medical diagnosis, data mining, troubleshooting, and more, so this article series will be of interest to anyone interested in building intelligent Web applications.

In this article, I will introduce some of the basic mathematical concepts and notations you need to know in order to properly apply the techniques of Bayesian inference. I will also demonstrate how you can implement conditional probability and Bayes theorem calculations using PHP, and how these calculations can be used to build an online medical diagnosis wizard.

In the next two articles, I will also explore the application of Bayesian inference to the design and analysis of Web surveys. This article lays some of the groundwork necessary for understanding this advanced application of Bayesian inference concepts.

The first and most important piece of groundwork to mention concerns the concept of conditional probability.



Page: 1 2 3 4 5 6 7 8 9 10 11 Next Page: Conditional probability

 

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

 


Transparen Corporation - Recent 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.
     
  • Emergency Management Services
      The prototypical emergency involves a shutdown of essential services for a finite period of time. What will your organization do when a world-wide financial crisis strikes?
     
  • Fast RAID Server Data Recovery Service
      Transparen's Vancouver International Response Team provides the option in Canada and USA to get a raid server back running in hours - eliminating costly waiting associated with typical RAID recoveries.
     
  • Data Recovery Service
      Have you deleted a mission critical file? Accidentally dropped a computer, or formatted a hard drive? No recent backup? Mistakes can happen, but the data might still be there.
     
  • About Transparen
      Transparen is committed to serving its clients.
     
  • 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.
     

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.

 
 Emergency Management Services
The prototypical emergency involves a shutdown of essential services for a finite period of time. What will your organization do when a world-wide financial crisis strikes?

 
 Fast RAID Server Data Recovery Service
Transparen's Vancouver International Response Team provides the option in Canada and USA to get a raid server back running in hours - eliminating costly waiting associated with typical RAID recoveries.

 
 Data Recovery Service
Have you deleted a mission critical file? Accidentally dropped a computer, or formatted a hard drive? No recent backup? Mistakes can happen, but the data might still be there.

 
 About Transparen
Transparen is committed to serving its clients.

 
 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.

 
 R. c. Corbin, 2008 NBCP 52 (CanLII)

 
 R. v. Webb, 2008 NBPC 51 (CanLII)

 
 R. v. Seeglitz, 2008 NBPC 50 (CanLII)

 
 R. v. Goulette, 2008 NBPC 48 (CanLII)

 
 A Death in the Family - Documentary
Today on the podcast, the story of Paul Johnson and Bill Mullins-Johnson, two brothers from Sault Saint Marie, Ontario whose lives were torn apart after the murder of Paul's four-year-old daughter ... a crime that turned the two men against each other even though neither of them had committed it.

 
 06/01/2009: The Threatening Sea
Today on the podcast, we continue our Watershed series with a trip to Vanuatu, a nation of 83 islands in the South Pacific that is slowly but surely sinking into the sea.

 
 05/01/2009: Australia Drought
Dispatches from The Big Dry. Current producer Kathleen Goldhar brings us a report from Australia's enduring drought and the economy it's spawned, where rainless communities unravel, only the adaptable prosper and water is the new gold standard.

 
 02/02/2009: Economy Panel - 2009 Forecast
With the annus horibilis of 2008 in the rear view mirror, and 2009 lying in the wait, The Current organized an economy panel to give us their forecast for the new year.

 
 31/12/2008: Looking at Israel
Israel is a country where history is never really past, and where politics leeches into all quarters of society. No historian is merely an academic or a chronicler of the times. What he or she writes, in some cases, becomes the starting point of painful and contentious self-examiniation. In this podcast you will hear from a controvesial Israel professor and an author and intellectual counterpart to our first guest.

 
 30/12/2008: Gaza Witnesses
For some perpective about how Israel's latest military campaign is affecting ordinary Gazan citizens Tom Harrington was joined by two guests to discuss what they have been witnessing. Their stories and more about can be heard in this podcast.

 
 29/12/2008: Year-End Political Panel
It's been a year to remember, even if a lot of people would rather forget it ... elections and rumours of elections ... a tenuous coalition and an empty house of commons ... far-off wars and fears of financial Armageddon at home. There's still a couple of days left in it, but 2008 is marching into the history books, and so it's time for a post-mortem on a year that kept political watchers busy. In today's podcsat, you'll be hearing the thoughts of those on our year-end political panel for 2008.

 
 24/12/2008: Helping the Homeless
For Stephen Hwang, the term "help the homeless" has taken on deep meaning. The son of Chinese immigrants, he was born in the U.S. and studied medicine at the country's finest schools. He faced a bright career in research there. But he turned his back on that, and chose instead to move to Canada, and dedicate his work to studying and helping the homeless. We hear his story in today's podcast.

 

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
* Alma * Aroostook * Atholville * Baker Brook * Balmoral * Bas Caraquet * Bath * Bathurst * Belledune * Beresford * Bertrand * Blacks Harbour * Blackville * Bouctouche * Bristol * Cambridge-Narrows * Campbellton * Canterbury * Cap Pélé * Caraquet * Centreville * Charlo * Chipman * Clair * Dalhousie * Dieppe * Doaktown * Dorchester * Drummond * Edmundston * Eel River Crossing * Florenceville * Fredericton * Fredericton Junction * Gagetown * Grand Bay-Westfield * Grand Falls * Grand Manan * Grande-Anse * Hampton * Hartland * Harvey * Hillsborough * Kedgwick * Lac Baker * Lameque * Le Goulet * Maisonnette * McAdam * Meductic * Memramcook * Millville * Minto * Miramichi * Moncton * Nackawic * Neguac * New Maryland * Nigadoo * Norton * Oromocto * Paquetville * Perth-Andover * Petitcodiac * Petit Rocher * Plaster Rock * Pointe-Verte * Port Elgin * Quispamsis * Rexton * Richibucto * Riverside-Albert * Riverview * Riviere-Verte * Rogersville * Rothesay * Sackville * Saint-Andre * Saint-Antoine * Saint-François-de-Madawaska * Saint-Hilaire * Saint-Isidore * Saint John * Saint-Leolin * Saint-Leonard * Saint-Louis-de-Kent * Saint-Quentin * Sainte-Anne-de-Madawaska * Sainte-Marie - Sainte-Raphael * Salisbury * Shediac * Shippagan * Stanley * St. Andrews * St. George * St. Martins * St. Stephen * Sussex * Sussex Corner * Tide Head * Tracadie-Sheila * Tracy * Woodstock * Aberdeen * Aboujagane * Acadie * Acadie Siding * Acadieville * Adams Gulch * Adamsville * Addington * Albert Mines * Albrights Corner * Alcida * Alderwood * Aldouane * Allainville * Allardville * Allison * Ammon * Anagance * Anderson Road * Anderson Settlement * Andersonville * Anfield * Anse-Bleue * Apohaqui * Arbeau Settlement * Armond * Arthurette * Ashland * Astle * Aulac * Avondale * Back Bay * Baie-Ste-Anne * Baie Verte * Barryville * Bartibog Bridge * Bates Settlement * Bay du Vin * Bayside * Beaubassin East * Beaverbrook * Beaver Dam * Bellefleur * Benjamin River * Berwick * Bettsburg * Big Hole * Big River * Black River * Black River Bridge * Blair Athol * Blissfield * Blissville * Bloomfield * Bloomfield Ridge * Boiestown * Bocabec * Brantville * Brockway * Browns Flat * Bull Lake * Burnsville * Burnt Church * Burton * Burtts Corner * Cains River * Campbell Settlement * Campobello Island * Canton des Basques * Caron Brook * Carrolls Crossing * Casillis * Caverhill * Chamcook * Chatham * Chatham Head * Chelmsford * Clarkville * Cloverdale * Cocagne * Coles Island * Collette * Connors * Cornhill * Coteau Road * Dalhousie Junction * Daulnay * Dawsonville * Debec * Deer Island * Derby * Devereaux * Douglas * Douglastown * Dugas * Duguayville * Dumfries * Dundee * Dunlop * Durham Bridge * Eel Ground * Elgin * Escuminac * Evandale * Évangéline * Fairisle * Fairvale * Five Fingers * Flatlands * Four Falls * Gauvreau * Geary * Glassville * Glencoe * Glen Levit * Glenwood * Gondola Point * Grafton * Grande-Digue * Gravel Hill * Gray Rapids * Hainesville * Hampstead * Hanwell * Hardwicke * Hartfield * Hatfield Point * Haut-Lamèque * Haut-Sheila * Havelock * Hawkshaw * Hazeldean * Head of Millstream * Health Steele * Hebron * Honeydale * Howard * Hoyt * Inkerman * Jacquet River * Janeville * Jemseg * Johnsville * Juniper * Keswick Ridge * Kingsclear * Kingston * Kouchibouguac * Lagacéville * Lake George * Lakeville * LaPlante * Lavillette * Lawrence Station * Limestone * Loggieville * Lorne * Losier Settlement * Lower Newcastle * Ludlow * Mactaquac * Madran * Magaguadavic Settlement * Magundy * Maltampec * Maple Ridge * Marysville * Maugerville * McGivney * McGraw Brook * McLeods * McNamee * Menneval * Millerton * Miramichi Bay * Miscou Island * Moulin-Morneault * Napadogan * Napan * Nash Creek * Nashwaak Bridge * Nashwaak Village * Nasonworth * Nauwigewauk * Nelson * Nelson Hollow * New Bandon * New Denmark * New Jersey * New Mills * Nicolas-Denys * Noonan * Nordin * North Head * North Tetagouche * Northampton * Notre-Dame * Notre-Dame-de-Lourdes * Notre-Dame-des-Érables * Oak Bay * Odell * Otis * Oxbow * Pabineau Falls * Parker Ridge * Pembroke * Penniac * Penobsquis * Petite-Lamèque * Petite-Rivière-de-l'Ile * Petite-Tracadie * Pigeon Hill * Pinder * Pocologan * Point La Nim * Pointe-à-Bouleau * Pointe-Alexandre * Pointe-Canot * Pointe-Sapin * Pokemouche * Pokeshaw * Pokesudie * Pokiok * Pont-Lafrance * Pont-Landry * Porten * Priceville * Prince William * Quarryville * Queensbury * Quisbis * Red Bank * Renforth * Renous * Richibouctou-Village * Riley Brook * Ripples * Riviere-du-Portage * Robertville * Robinsonville * Rosaireville * Rossville * Rough Waters * Saint-Arthur * Saint-Basile * Saint-Charles * Saint-Ignace * Saint-Irenée * Saint-Jacques * Saint-Jean-Baptiste-de-Restigouche * Saint-Joseph-de-Madawaska * Saint-Laurent * Saint-Martin-de-Restigouche * Saint-Maure * Saint-Sauveur * Saint-Simon * Sainte-Louise * Sainte-Marie-de-Kent * Sainte-Rose * Salmon Beach * Saumarez * Scotch Lake * Seal Cove * Sevogle * Shannonvale * Sheffield * Shemogue * Siegas * Sillikers * Sisson Ridge * Southampton * South Tetagouche * Springfield * Squaw Cap * St. Margarets * Stickney * Strathadam * Stonehaven * Sunny Corner * Tabusintac * Targettville * Taxis River * Taymouth * Temperance Vale * Tetagouche Falls * Tilley * Tracadie Beach * Tremblay * Upper Blackville * Upper Kent * Upper Queensbury * Upsalquitch * Val-Comeau * Val-d'Amour * Val-Doucet * Verret * Village-Blanchard * Village-Saint-Laurent * Waterville * Wayerton * Weaver Siding * Welsford * Westfield * White Rapids * Whites Cove * Wicklow * Williamstown * Wilsons Beach * Wirral * Zealand * Aberdeen * Acadieville * Addington * Allardville * Alma * Alnwick * Andover * Baker Brook * Balmoral * Bathurst * Beresford * Blackville * Blissfield * Blissville * Botsford * Bright * Brighton * Brunswick * Burton * Cambridge * Campobello * Canning * Canterbury * Caraquet * Cardwell * Carleton * Chatham * Chipman * Clair * Clarendon * Colborne * Coverdale * Dalhousie * Denmark * Derby * Dorchester * Douglas * Drummond * Dufferin * Dumbarton * Dumfries * Dundas * Durham * Eldon * Elgin * Gagetown * Gladstone * Glenelg * Gordon * Grand Falls * Grand Manan * Greenwich * Grimmer * Hammond * Hampstead * Hampton * Harcourt * Hardwicke * Harvey * Havelock * Hillsborough * Hopewell * Huskisson * Inkerman * Johnston * Kars * Kent * Kingsclear * Kingston * Lac-Baker * Lepreau * Lincoln * Lorne * Ludlow * Madawaska * Manners Sutton * Maugerville * McAdam * Moncton * Musquash * Nelson * New Bandon * New Maryland * Newcastle * North Lake * Northampton * Northesk * Northfield * Norton * Notre-Dame-de-Loudres * Paquetville * Peel * Pennfield * Perth * Petersville * Prince William * Queensbury * Richibucto * Richmond * Rivière-Verte * Rogersville * Rothesay * Sackville * Saint Andrews * Saint Croix * Saint David * Saint George * Saint James * Saint Martins * Saint Mary * Saint Marys * Saint Patrick * Saint Stephen * Saint-André * Saint-Basile * Saint-Charles * Saint-François * Saint-Hiliare * Saint-Isidore * Saint-Jacques * Saint-Joseph * Saint-Louis * Saint-Léonard * Saint-Paul * Saint-Quentin * Sainte-Anne * Salisbury * Saumarez * Shediac * Sheffield * Shippagan * Simonds, Carleton County * Simonds, Saint John County * Southampton * Southesk * Springfield * Stanley * Studholm * Sussex * Upham * Wakefield * Waterborough * Waterford * Weldford * Wellington * West Isles * Westfield * Westmorland * Wickham * Wicklow * Wilmot * Woodstock