Probability In Statistics

These are my notes on probability in statistics.

Ankr Store on Amazon, keep your electronics charged by the best! f you buy something, I get a small commission and that makes it easier to keep on writing. Thank you in advance if you buy something.


Introduction
Words like probability, chance, and likely have similar meanings when used
casually. They all convey uncertainty. By using probability, we can make
numerical statements about uncertainty. Probability is a measure of the likelihood of an event. 

Sample Space
Any process that results in an observation or an outcome is an experiment. An
experiment may have more than one possible outcome. A set of all possible
outcomes of an experiment is known as a sample space. It is generally denoted
using the letter \(S\). 

Tossing a coin will result in one of two possible outcomes, heads or tails.
Therefore, the sample space of tossing a coin is

\(S = {Heads, Tails}\)

Throwing a six sided die will result in one of six possible outcomes. The
resulting sample space is

\(S = {1,2,3,4,5,6}\)

Tossing two coins will result in one of four possible outcomes. We can indicate
the outcome of each of the two tosses by using a pair of letters, the first
letter of which indicates the outcome of tossing the first coin and the second
letter the outcome of tossing the second coin. H is for heads and T is for
tails. The resulting sample space is

\(S = {(H,H), (H,T), (T,H), (T,T)}\)

The outcomes listed in a sample space are never repeated, and no outcome is left
out. Two events are said to be equally likely if one does not occur more often
than the other. For example, the six possible outcomes for a throw of a die are
equally likely. 

A tree diagram representation is useful in determining the sample space for an
experiment, especially if there are relatively few possible outcomes. For
example, imagine an experiment in which a die and a quarter are tossed together.
What are all the possible outcomes? The six possible outcomes of throwing a die
are 1,2,3,4,5,6. The two possible outcomes of using a quarter are Heads and
Tails. 

The probability of an event is generally denoted by a capital P followed by the
name of the event in parentheses. If all the events in a sample space are
equally likely, the by using the concept of relative frequency, we can compute
the probability of an event as:

\(P(event) = \frac{true-outcomes}{total-outcomes}\)

Applying this to the events defined earlier:

\(P(A) = \frac{3}{6} = \frac{1}{2} = 0.5\)
The probability of getting an even number when a six sided die is thrown is 0.5.
In other words, there is a 50% chance of getting an even number when a six sided
die is thrown.

\(P(B) = \frac{1}{4} = 0.25\)
The probability of getting two heads when two coins are tossed is 0.25. In other
words, there is a 25% chance of getting two heads when two coins are tossed.

Probability Rules and Terms
There are two rules that all probability must satisfy.
Rule 1: For any event A, the probability of A is always greater than or equal to
0 and less than or equal to 1.
Rule 2: The sum of the probabilities for all possible outcomes in a sample space
is always 1.
So, if an event can never occur, its probability is 0. Such an event is known as
an impossible event.
If an event must occur every time, its probability is 1. Such an event is known
as a sure event. 
The odds in favor of an event is a ratio of the probability of the occurrence of
an event to the probability of the nonoccurrence of that event. 

\(Odds-of-event = \frac{P(Event-Occurs)}{P(Event-Doesn't-Occur)}\)
or:
\(P(Event-occurs) : P(Event-Doesn't-Occur)\)

Example 1
When tossing a die, what are the odds in favor of getting the number2?
When tossing a die:
\(P(2) = \frac{1}{6}\)
and:
\(P(not-2) = \frac{5}{6}\)
So, the odds in favor of getting the number 2 are \(\frac{1}{6}:\frac{5}{6} or
1:5\)

The Venn diagram illustrates some of the following terms. The rectangular box
indicates the sample space. Circles indicate different events. 
The complement of an event is the set of all possible outcomes in a sample space
that do not lead to the event. The complement of an event is denoted by A'.
Disjoint or mutually exclusive events are events that have no outcome in common.
In other words, they cannot occur together. Two separate circles in a Venn
diagram are disjoint events. 

The union of events A and B is the set of all possible outcomes that lead to at
least one of the two events A and B. The union of events A and B is denoted by
\(A-or-B\). The intersection of events A and B is the set of all possible
outcomes that lead to both events A and B. The intersection of events A and B is
denoted \(A-and-B\). 
A conditional event: A given B is a set of outcomes for event A that occurs if B
has occurred. It is indicated by "A given B". Two events A and B are considered
independent if the occurrence of one event does not affect the probability of
the other event. 

Independence vs. Dependence
Events happening that do not depend on each other are called independent. If the
events are related, then we call this a dependent event. 

Example 2
The sample space for throwing a die is S={1,2,3,4,5,6}. Suppose events A,B, and
C are defined as follows:
A=Getting an even number={2,4,6}
B=Getting at least 5={5,6}
C=Getting at most 3={1,2,3}
Find the probability of each of these events and its complement. Then, find the
union, intersection, and conditional probability of each pair of events.
Solution:
    \(P(A)=\frac{3}{6}=0.5\)
    \(P(B)=\frac{2}{6}=0.3\)
    \(P(C)=\frac{3}{6}=0.5\)
Complement:
A'=Getting an odd number={1,3,5}
    P(A')=\frac{3}{6}=0.5=1-P(A)
    B'=Getting a number less than 5={1,2,3,4}
        P(B')=\frac{4}{6}=0.6=1-P(B)
    C'=Getting a number larger than 3={4,5,6}
        P(C')=\frac{3}{6}=0.5=1-P(C)
Union:=
Getting an even number or a number greater than or equal to 5 or both
    ={2,4,5,6} = \(P(A-orB)=\frac{4}{6}=0.6\)
    A or C=Getting an even number or a number less than or equal to 3 or both
    ={1,2,3,4,6} = P(A or C)=\(\frac{5}{6}=0.83\)
    B or C=Getting a number that is at most 3 or at least 5 or both
    ={1,2,3,5,6} = P(B or C)=\(\frac{5}{6}=0.83\)
Intersection: 
(A and B)=Getting an even number that is at least 5={6}
    P(A and B)=\(\frac{1}{6}=0.16\)
(A and C)=Getting an even number that is at most 3={2}
    P(A and C)= P(A and C)=\frac{1}{6}=0.16
(B and C)=Getting a number that is at most 3 and at least 5 ={}
    P(B and c)=\(\frac{0}{6} = 0 = 0.0\)
So, B and C are disjoint or mutually exclusive events.
Conditional Events:
    (A|C)=Getting an even number given that the number is at most 3={2}
        P(A!C)=\(\frac{1}{3}=0.3\)
    (A|B)=Getting an even number given that the number is at least 5={6}
        P(A!B)=\(\fgrac{1}{2}=0.5\)
    (B|C)=Getting at least 5 given that the number is at most 3 =0
        \(P(B|C)=0\)