Probability

Rumman Ansari   Software Engineer   2023-02-23   144 Share
☰ Table of Contents

Table of Content:


Probability

Terms

Experiment

An 'Experiment' is a procedure that can be repeated infinitely, resulting in a set of possible outcomes.

Sample Space

The set of all possible outcomes of an experiment forms a 'Sample Space'.

Events

An 'Event' is a subset of the outcomes of an experiment.


Properties of Probability

Properties of Probability

Property 1

Probability value lies between 0 and 1.

$$0 \leq P(A) \leq 1$$


Property 2

The probability of an impossible event is 0.

$$P(\varnothing)=0$$


Property 3

The probability of a confirmed event is 1.

$$P(S)=1$$


Property 4

The sum of the probabilities of an event, and its complementary is 1.

$$P(A)+P(A^c)=1$$


Probability

  • The likelihood of the occurrence of an event is known as probability.
  • The value of probability of an event lies between 0 and 1.

Formula

$$P(A) = \frac{N(A)}{N}$$

where \(P(A) \) is the probability of event \( A \) occurring, \(N(A) \) is the number of ways event \( A \) can occur, and \(N \) is the total number of possible outcomes.

In some books you will get this Formula also, but Both are same in terms of logic

$$P(E) = \frac{n(E)}{n(S)}$$ $$P(E) = \frac{ No. \:of \:Favorable \:Outcomes }{ Total \:no. \:of \:outcomes }$$

where \( n(E) \) is the number of favorable outcomes for event \(E \) and \(n(S)\) is the total number of possible outcomes in the sample space.

The probability of an event \( E \) is given by: $$P(E) = \frac{\text{number of favorable outcomes}}{\text{number of possible outcomes}}$$


Example 1:

Suppose we have a bag with 5 red balls and 3 blue balls. What is the probability of drawing a red ball?

The sample space is the total number of balls in the bag, which is 8. The number of favorable outcomes is the number of red balls in the bag, which is 5.

Using the formula for probability, we have:

$$P(\text{red ball}) = \frac{5}{8}$$

Therefore, the probability of drawing a red ball from the bag is \(\frac{5}{8}\).


Example 2:

Suppose we flip a fair coin once. What is the probability of getting heads?

The sample space is the total number of possible outcomes, which is 2 (heads or tails). The number of favorable outcomes is the number of times heads can occur, which is 1.

Using the formula for probability, we have:

$$P(\text{heads}) = \frac{1}{2}$$

Therefore, the probability of getting heads when flipping a fair coin once is \(\frac{1}{2}\).


Example 3:

Suppose we roll a fair six-sided die once. What is the probability of getting an even number?

The sample space is the total number of possible outcomes, which is 6 (1, 2, 3, 4, 5, or 6). The number of favorable outcomes is the number of even numbers on the die, which is 3 (2, 4, or 6).

Using the formula for probability, we have:

$$P(\text{even number}) = \frac{3}{6} = \frac{1}{2}$$

Therefore, the probability of rolling an even number on a fair six-sided die once is \(\frac{1}{2}\).


Example 4:

Suppose we draw a card from a standard deck of 52 cards. What is the probability of drawing a heart?

The sample space is the total number of cards in the deck, which is 52. The number of favorable outcomes is the number of hearts in the deck, which is 13.

Using the formula for probability, we have:

$$P(\text{heart}) = \frac{13}{52} = \frac{1}{4}$$

Therefore, the probability of drawing a heart from a standard deck of 52 cards is \(\frac{1}{4}\).


Example 5:

Suppose we have a bag with 10 marbles, of which 4 are red, 3 are blue, and 3 are green. What is the probability of drawing a blue or green marble?

The sample space is the total number of marbles in the bag, which is 10. The number of favorable outcomes is the number of blue or green marbles, which is \( 3+3=6\).

Using the formula for probability, we have:

$$P(\text{blue or green}) = \frac{6}{10} = \frac{3}{5}$$

Therefore, the probability of drawing a blue or green marble from the bag is \(\frac{3}{5}\).