Click here to exit full screen mode.

Content begins here

How to avoid bias

Help Opens in a new window

Main page content

Click to collapse

How to avoid bias

This is an interactive tool that shows how our perspective on probability can change when we have new information.

Bayes Theorem and the Bayesian framework in Statistics can help us avoid such bias to how we view probability!

Road, Start, Beginning, Intention, Plant, Stop, Design

Image credit: www.pixabay.com

Bayes Theorem

begin mathsize 48px style bold P bold left parenthesis bold A bold vertical line bold B bold right parenthesis bold equals fraction numerator bold P bold left parenthesis bold B bold vertical line bold A bold right parenthesis bold space bold P bold left parenthesis bold A bold right parenthesis over denominator bold P bold left parenthesis bold B bold right parenthesis end fraction end style

See this video on how Bayes' Theorem is derived:

Bayes' Theorem in 1 minute

Bayes Theorem makes use of conditional probability. See more in the video CRITICAL THINKING - Fundamentals: Bayes' Theorem [Length- 6:20]

Bayesian Approach

The beauty of the Bayesian Approach in Statistics allows us to update our prior knowledge based on evidence from data observed.

With applications in current topics such as artificial intelligence and neural networks; this definitely makes the Bayesian paradigm relevant and important

Follow the link below to an Analytics Vidyha blog post that gives us an introduction on Bayesian Statistics. But Bayesian Statistics cannot be explained without introducing the Frequentist view of probability first. See more in the blog post:

Bayesian Statistics explained to Beginners in Simple English

If bold italic A and bold italic B are two events then

Error converting from MathML to accessible text.

can be written as

begin mathsize 18px style bold italic P bold left parenthesis bold italic A bold vertical line bold italic B bold right parenthesis bold equals fraction numerator bold P bold left parenthesis bold B bold vertical line bold A bold right parenthesis bold space bold P bold left parenthesis bold A bold right parenthesis over denominator bold P bold left parenthesis bold B bold vertical line bold A bold right parenthesis bold space bold P bold left parenthesis bold A bold right parenthesis bold space bold plus bold space bold P bold left parenthesis bold B bold vertical line bold A with bold bar on top bold right parenthesis bold space bold P bold r bold left parenthesis bold A with bold bar on top bold right parenthesis end fraction end style

 

 

Application of Bayes Theorem

  • Breathalysers display a false result in 5% of the cases tested
  • They never fail to detect a truly drunk person
  • 1/1000 of drivers are driving drunk
  • Policemen then stop a driver at random, and test them
  • The breathalyser indicates that the driver is drunk

What is the probability that a driver is drunk given that the breathalyser indicates that he/she is drunk?

Try this example and check if you reach the same conclusion as the Statistics for Decision Makers site by Bernard Szlachta.

When we alter the proportion of people that are sober as well as the error rate of the breathalyser test, we can reach an entirely different conclusion!

1. Introduction of the Law of Total Probability

begin mathsize 18px style bold italic P bold left parenthesis bold italic B bold right parenthesis bold equals bold sum for bold i of bold space bold italic P bold left parenthesis bold italic B bold vertical line bold italic A subscript bold i bold right parenthesis bold space bold italic P bold left parenthesis bold italic A subscript bold i bold right parenthesis end style 

so that

Error converting from MathML to accessible text.

can be written as

begin mathsize 18px style bold italic P bold left parenthesis bold italic A bold vertical line bold italic B bold right parenthesis bold equals fraction numerator bold P bold left parenthesis bold B bold vertical line bold A bold right parenthesis bold space bold Pr bold left parenthesis bold A bold right parenthesis over denominator bold sum for bold i of bold space bold P bold left parenthesis bold B bold vertical line bold A subscript bold i bold right parenthesis bold space bold P bold left parenthesis bold A subscript bold i bold right parenthesis end fraction end style

and
 

2. Introduction of the likelihood function L left parenthesis theta semicolon bold italic x right parenthesis which is the joint probability or probability density of all observations begin mathsize 18px style space x subscript 1 comma x subscript 2 comma... comma x subscript n end style:


begin mathsize 18px style L left parenthesis theta semicolon bold italic x right parenthesis equals space product from i equals 1 to n of f left parenthesis x subscript i vertical line theta right parenthesis
space space space space space space space space space space space space space equals f left parenthesis x subscript 1 vertical line theta right parenthesis. f left parenthesis x subscript 2 vertical line theta right parenthesis. space. space. space f left parenthesis x subscript n vertical line theta right parenthesis end style

Here Bayes Theorem has different notation on a continuous state space begin mathsize 24px style capital theta end style.

begin mathsize 36px style straight pi left parenthesis theta vertical line bold italic x right parenthesis equals fraction numerator L left parenthesis theta semicolon bold italic x right parenthesis straight pi left parenthesis theta right parenthesis over denominator integral subscript capital theta space L left parenthesis theta semicolon bold italic x right parenthesis straight pi left parenthesis theta right parenthesis d theta end fraction end style

Error converting from MathML to accessible text.
Error converting from MathML to accessible text. is the PRIOR distribution of some unknown parameter θ. This could be formulated from historical beliefs/ expert opinion on the behaviour of the parameter.
Error converting from MathML to accessible text. is the LIKELIHOOD function. It summarizes the relative number of ways in which the given data can be observed!
Error converting from MathML to accessible text. is the POSTERIOR/ updated distribution

 

There is a difference between the Frequentist and Bayesian Approaches.

So it is important to know what each of these methods entail.

Examples are used in these videos in order to explain the differences between the two approaches:

It always seems impossible until it's done.

Nelson Mandela

This quote is a "Bayesian viewpoint of the world" according to the YouTube video The Bayesian Trap [Length- 10:36]

However The Bayesian Trap first focuses on these points:

  • Bayes' Theorem interpretation when you test positive for a rare disease as well as how this probability changes if you get a second opinion
  • History and origin of the theorem
  • Practical application of Bayes in order to filter spam

There are currently no announcements

Full details...

Announcements

Attachments:

Add Comment

Edit Comment

Cancel

Delete Comment

Save

Editor, type ALT-0 for help

There are currently no conversations to display.

Error in adding forum summary:

Latest Discussions Conversations

Click to expand

Click to collapse

Please supply username.

Numbers only

Completed

Error in adding announcements:

Announcements