HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Probability is about how Likely something is to occur,or how likely something is true."
The probability of an event is:
The number of ways the event can happen / The number of possible outcomes.
When tossing a coin, there are two possible outcomes:
Way | Probability |
---|---|
Heads | 1/2 = 0.5 |
Tails | 1/2 = 0.5 |
The probability of an event A is often written as P(A).
When tossing two coins, there are 4 possible outcomes:
Event | P(A) |
---|---|
Heads + Heads | 1/4 = 0.25 |
Tails + Tails | 1/4 = 0.25 |
Heads + Tails | 1/4 = 0.25 |
Tails + Heads | 1/4 = 0.25 |
When throwing a dice, there are 6 possible outcomes:
Event | P(A) |
---|---|
Lands on 1 | 1/6 = 0.166666 |
Lands on 2 | 1/6 = 0.166666 |
Lands on 3 | 1/6 = 0.166666 |
Lands on 4 | 1/6 = 0.166666 |
Lands on 5 | 1/6 = 0.166666 |
Lands on 6 | 1/6 = 0.166666 |
The possibility of throwing 3 fours at the same time is
(1/6)3 (Lands on 4 to the power of 3):
The possibility of throwing 3 likes at the same time is 6 times larger:
(lands on 1) + (Lands on 2) + ... + (Lands on 6)
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 that I pick a green one is 2 out of 6: 2/6 = 0.333333.
The probability is written P(green) = 0.333333.
P(A) | W/O | Probability |
---|---|---|
P(red) | 3/6 | 0.5000000 |
P(green) | 2/6 | 0.3333333 |
P(blue) | 1/6 | 0.1666666 |
P(A) = P(B) | Event A and B have the same chance to occur |
P(A) > P(B) | Event A has a higher chance to occur |
P(A) < P(B) | Event A has a lower chance to occur |
For the 6 balls:
P(red) > P(green) | I am more likely to pick a red than a green |
P(red) > P(blue) | I am more likely to pick a red than a blue |
P(green) > P(blue) | I am more likely to pick a green than a blue |
P(blue) < P(green) | I am less likely to pick a blue than a green |
P(blue) < P(red) | I am less likely to pick a blue than a red |
P(green) < P(red) | I am less likely to pick a green than a red |
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.