Post on 22-Feb-2016
description
transcript
Basics of probability calculus
By Simo Määttä, Kajaani University of applied sciences, spring 2010
What is probability?
Probability in general is a way to measure how certainly some outcome will happen in the future in some experiment.
Experiment can be what ever situation that involves some kind of uncertainty
Examples: 1. Throwing a coin 2. Measuring person’s height if person is
selected randomly
Classical probability We define that element is one possible
outcome in the experiment Complete group of all element is called
sample space Classical probability assumes that
probabilities of every elements are equal Example:Throwing a dice.All elements (outcomes, 1, 2, 3, 4, 5 or 6) have the same probability of happening (1/6 *100% = 1,6666 % )
Denotions We denote groups of possible outcomes as capital letter A,
B, C and so on and we call them events
Example: We through a dice. Possible outcomes are 1, 2, 3, 4, 5, 6. Now we could for example have A = {we get 2 or 3}
Probability of A is denoted with P(A) =probability that A happens
Probability of possible event A can be calculated with formula
Example
A = { We get 1, 2 or 4} P(A)=3/6 = 0,5 50%
There is 7 men and 15 female in a class. What is the probability that randomly selected person is a female?
Solution: 15 /(7+15) = 0,6818 68,2 %
Properties of probability
Let A and B be events Always 0≤P(A) ≤ 1 If P(A) = 0 then A is impossible event If P(A) = 1 then A is 100 % certain
event
Properties of probability If A and B are mutually exclusive then
P(A or B) = P(A) + P(B) We denote Ac = complement of A (= event
where A will not happen) Now
P(Ac)= 1 – P(A) If G = group of all elements (possible
outcomes) then▪ P(G) = 1 (Probability that something happens
and obviously something always happens)
Random variables
Random variable is a function that attach number to each of the elements.
Example: Person’s height is a random variable if a person is selected randomly. This variable attach number ”height in centimeters” to each person that can be selected (elements)
We denote random variable as X, Y, etc.
Distribution of a random variable Certain values of random variable have their own
specific probabilities. These probabilities can be presented with probability distribution.
Example:
We through two dices. Let our random variable X be the sum of the numbers we get. Now elements are (1, 1), (1, 2), (2, 1), …, (6, 6). X attach number 2 to outcome (1, 1) and number 3 to outcomes (1, 2) and (2, 1) and so on. There are 36 elements (possible outcomes) --
example All elements and corresponding values of our
random variable are in the following table:
Now we can calculate probablitities as P(x=2) = 1/36, P(X=3)=2/36, … , P(X=12) =
1/36
Dice 2
Dice 1
1 2 3 4 5 61 2 3 4 5 6 72 3 4 5 6 7 83 4 5 6 7 8 94 5 6 7 8 9 105 6 7 8 9 10 116 7 8 9 10 11 12
example We can present this distribution for
example by graph as follows:
This is a probability distribution of our random variable X
Continuous and discrete random variable
Random variables that can only have some specific value are called discrete
Random variables that can have every value between some values are called continuous
Continuous random variables In previous example random variable
was discrete because it could only have values 2, 3, …, 11 and 12
How to describe probability distributions for continuous random variables that can have infinite number of values???
Density function Probability of one specific value of continuous
random variable is equal to 0!!!
Example Let X be weight.Now P(X=45 kg) = 1/infinity = 0, because there is infinite number of possible values for X (X is continuous) and 45 is only one of them.
we can’t make probability distribution in a same way as before
Density function
Probabilities of some values of continuous random variable X can be calculated with help of density function (denoted with f(x))
Density function f(x) is a graph in (x, y) coordinate system and it describes probabilities of values of X
Now P(x1<X<x2) = area between x-axis and density function curve between values x1 and x2
Density function Example: Let X be person’s height
Density function Always: P(X gets some value) = 1
Density function Most common density function is so
called normal distribution.
Density function In this course we will need Chi-square –
distribution.
Distributions If probabilities of some continuous random
variable obeys some distribution we denote that with sign ”~”
Example X~ N(0,1), X obeys normal distribution with
mean of 0 and standard deviation of 1 X~χ2(f), X obeys Chi-square distribution with
degrees of freedom f (number that specifies the shape of the distribution, see earlier picture). (χ is a greek letter)
Probabilities of most commonly used distributions have been tabulated so we can get desired probabilities from these tables