Files
freeCodeCamp/guide/english/mathematics/probability/index.md
Anas Salam ae33d5888f Probability index.md file updated (#27836)
index.md file updated with more info, some examples and cases.
2019-06-24 15:24:03 -07:00

2.4 KiB

title
title
Probability

Probability

The probability of an event is the chance that an event is going to occur.

Probabilities generally range from 0 to 1, with 0 indicating that an event will never happen and 1 that an event will happen for certain.

The total of all probabilities will always sum up to 1.
If the probability of a event happening is 0.75, then the probability of an event NOT happening will be 1 - 0.75 = 0.25, (the event not happening is calculated as reverse of this event happening).

Example 1:
A coin has 2 sides, (Head and Tail).
When an unbaised coin is flipped, there are 2 possibilities. The chances of Head appearing is 1/2 and similarly a Tail appearing is 1/2.
The total of all outcomes will always be equal to 1, like in this case 1/2 + 1/2 = 1.

Example 2:
A dice has 6 sides, (1, 2, 3, 4, 5 and 6).
When an unbaised dice is rolled, each side has a probability of 1/6 or (0.1667) appearing.
Similarly in this example too, the total of all outcomes will be 1, (0.1667 + 0.1667 + 0.1667 + 0.1667 + 0.1667 + 0.1667 = 1).

  Case 1:
  chances of an odd number appearing is 3/6, (1, 3 and 5).
  
  Case 2:
  chances of number 6 NOT appearing is 5/6, (1 - 1/6).
  

Example 3:
A standard deck of cards has 52 cards, consisting of 4 suits - 2 Red suits (Hearts ♥ and Diamonds ♦) and 2 Black suits (Spades ♠ and Clubs ♣). And each suit has 13 cards with an Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen and King.
The probability of each card being withdrawn is 1/52.

  Case 1:
  chances of a Red card being randomly drawn from a standard deck of cards is 26/52, (13 Diamonds + 13 Hearts = 26 total Red).
  
  Case 2:
  chances of number 5 appearing is 4/52, (one from each Suit).
  
  Case 3:
  chances of Ace of Spades appearing is 1/52, (only 1 Ace in Spades Suit).
  
  Case 4:
  chances of a Face card appearing is 12/52, (3 Face cards in each Suit namely Jack, Queen and King)
  
  Case 5:
  chances of 8 of Hearts NOT appearing is 0.98, (1 - 1/52).
  

More Information: