Tutorials References Menu

Artificial Intelligence

Probability

Probability is about how Likely something is.

Probability is a Number between 0 and 1.

Probability is about how likely something is to occur, or how likely something is true.

The mathematic probability is a number between 0 and 1, where 0 indicates impossibility and 1 indicates certainty.

The probability of an event is:

The Number of ways it can happen / The number of possible outcomes.

Probability = Ways / Outcomes


Tossing Coins

Coin Coin

When tossing a coin, there are two possible outcomes:

HeadsProbability is 0.5
TailsProbability is 0.5

1 possibility (Heads) / 2 outcomes (Heads / Tails) = 1/2 = 0.5


P(A) - The Probability

The probability of an event A is often written as P(A).

When tossing two coins, there are 4 possible outcomes:

EventP(A)
Heads + Heads0.25
Tails + Tails0.25
Heads + Tails0.25
Tails + Heads0.25

1 possibility (Heads + Heads) / 4 outcomes = 1/4 = 0.25


Throwing Dices

Dice Dice Dice

When throwing a dice, there are 6 possible outcomes:

EventP(A)
Lands on 10.1666666...
Lands on 20.1666666...
Lands on 30.1666666...
Lands on 40.1666666...
Lands on 50.1666666...
Lands on 60.1666666...

1 Possibility: Lands on 1 / 6 outcomes = 1/6 = 0.1666666...


P(A) = P(B)

P(A) = P(B)Events A and B have the same chance to occur.
P(A) > P(B)the event A has a higher chance to occur.
P(A) < P(B)the event A has a lower chance to occur.

Choosing a King

King

The probability of choosing a king in a deck of cards is 4 in 52.

Number of ways it can happen are 4 (there are 4 kings).

Number of outcomes are 52 (there are 52 cards).

The probability is 4 out of 52: 4/52 = 0.076923...

The probability is written P(king) = 0.076923.

Probability = Ways / Outcomes


6 Balls

I have 6 balls in a bag: 3 reds, 2 are green, and 1 is blue.

Blindfolded. What is the probability that I pick a green one?

Number of ways it can happen are 2 (there are 2 greens).

Number of outcomes are 6 (there are 6 balls).

The probability is 2 out of 6: 2/6 = 0.333333...

The probability is written P(red) = 0.333333.

Probability = Ways / Outcomes