Materials Science and Engineering/List of Topics/Statistical Mechanics/Probability/General Definitions

Mathematical treatment
In mathematics a probability of an event, A is represented by a real number in the range from 0 to 1 and written as P(A), p(A) or Pr(A). An impossible event has a probability of 0, and a certain event has a probability of 1. However, the converses are not always true: probability 0 events are not always impossible, nor probability 1 events certain. The rather subtle distinction between "certain" and "probability 1" is treated at greater length in the article on "almost surely".

The chance of the opposite of an event P(not A) = 1-P(A), for example the chance of not rolling a six on a six-sided die is 1 - chance of rolling a six = $${1} - \tfrac{1}{6} = \tfrac{5}{6}$$. If two events, A and B are independent then the joint probability is
 * $$P(A \mbox{ and }B) = P(A \cap B) = P(A) P(B),\,$$

for example if two coins are flipped the chance of both being heads is $$\tfrac{1}{2}\times\tfrac{1}{2} = \tfrac{1}{4}$$.

If two events are mutually exclusive then the probability of either occurring is
 * $$P(A\mbox{ or }B) = P(A \cup B)= P(A) + P(B).$$

For example, the chance of rolling a 1 or 2 on a six-sided die is $$P(1\mbox{ or }2) = P(1) + P(2) = \tfrac{1}{6} + \tfrac{1}{6} = \tfrac{1}{3}$$.

If the events are not mutually exclusive then
 * $$\mathrm{P}\left(A \hbox{ or } B\right)=\mathrm{P}\left(A\right)+\mathrm{P}\left(B\right)-\mathrm{P}\left(A \mbox{ and } B\right)$$.

Conditional probability is the probability of some event A, given the occurrence of some other event B. Conditional probability is written P(A|B), and is read "the probability of A, given B". It is defined by
 * $$P(A \mid B) = \frac{P(A \cap B)}{P(B)}.\,$$

If $$P(B)=0$$ then $$P(A \mid B)$$ is undefined.