Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basics of probability Notes from: www.anu.edu.au/nceph/surfstat.

Similar presentations


Presentation on theme: "Basics of probability Notes from: www.anu.edu.au/nceph/surfstat."— Presentation transcript:

1

2 Basics of probability Notes from: www.anu.edu.au/nceph/surfstat

3 A concept of probability Probability is the study of uncertainty. E.g.A coin comes down heads 50% of the time. In the limit, as # tosses -> infinity

4 Example - 2 coin tosses Toss a coin twice, record each result : (H) or (T). List the possible outcomes. Let A be the event of one or more heads. Which outcomes belong to event A? Let B be the event that there are no heads. In this example, events A and B are said to be disjoint or mutually exclusive, as they have no outcomes in common. They are also exhaustive, as they cover all possible outcomes. Define an event C which is not disjoint from A.

5 DEFINITIONS A Sample space is set of all possible outcomes of an experiment. An event is a set of one or more outcomes in the sample space. Two events are disjoint or mutually exclusive if they have no outcomes in common. Random variation occurs when it is impossible to predict with certainty the exact outcome of an individual experiment, but as the experiment is repeated a large number of times a regular distribution of relative frequencies emerges.

6 Defining probability Probability of an event can be determined either empirically or theoretically. Empirical definition: Suppose an event A occurs f times in n observations By analogy with relative frequencies: P(A) is a value from 0 to 1 inclusive. P(A) = 0 means A never occurs (corresponding to f = 0) P(A) = 1 means A always occurs (corresponding to f = n) The collection S of all possible outcomes has probability 1: P(S) = 1.

7 Example: age at last birthday Events: A 1 : age < 20 years A 2 : age 20 - 24 years and so on. Age at last birthday (years) 34 A 1 A 2 A 3 A 4 A 5 Chance that a person belongs to A 2 and A 3 ? Chance that a person belong to A 2 or A 3 ?

8 Probability rules Above categories cover all possibilities, so they are said to be exhaustive. In general, if there are K events A 1,A 2,...,A k which are disjoint and exhaustive then P(A 1 ) + P(A 2 ) +... + P(A k ) = 1 P(not A 2 ) = ? The complement of A i is the event that A i does not occur P(not A i ) = 1 - P(A i )

9 Reducing discrimination in hiring All current employees overseas born women Commitment: 30% Irish and 40% men 35% will still by overseas born women What % of Irish men are to be hired? MenWomenTotal Overseas Irish Total

10 Non-exclusive events If events X and Y are mutually exclusive, then P(X or Y) = P(X) + P(Y) A certain kind of fruit is grown in 2 districts, A and B. Both areas sometimes get fruitfly. P(A) = 1/10, P(B) = 1/20, P(A and B) = 1/50 P(A or B)= ? If events X and Y are not mutually exclusive then P(X or Y) = P(X) + P(Y) - P(X and Y).

11 Random Variables A random variable (r.v.) is a numerical value which is defined on or determined by the outcomes or events of an experiment. Random variables are usually denoted by capital letters, X, Y etc and can be discrete or continuous. Let the r.v. X be the number of seeds germinating from 100. Possible values for X are 0,1,2,…,100 (discrete) Let the r.v. X be the maximum daily temperature in Cork. Possible values are -20 - 40 C e.g. 26.1276 (continuous) Let X be response to question with 'Yes', 'No', 'Don't know'. X is not a r.v. (not numerical). Let Y be number of 'Yes's. Y is discrete r.v.

12 Discrete probability distributions List of mutually exclusive and exhaustive outcomes of some process and their probabilities Example - 1 coin toss Outcome:HeadTail Probability:1/2 Example - 1 fair die throw #spots:123456 Probability:1/6 This is an example of a discrete uniform distribution

13 DISCRETE DISTRIBUTIONS Example - Family of 3 children. Let X = number of girls Possible values: X = 3 GGG X = 2 GGB GBG BGG X = 1 BBG BGB GBB X = 0 BBB Assume the 8 outcomes are equally likely so that x 0 1 2 3 P(X = x)1/83/8 3/81/8 P(X  x)

14 Probability Distribution of a Discrete r.v. The probabilities may be written as: P(X i =x i ) is also referred to as the density function f(x) The cumulative distribution function (c.d.f.) is defined as

15 Example - Bernoulli trials Each trial is an 'experiment' with exactly 2 possible outcomes, "success" and "failure" with probabilities p and 1-p. Let X = 1 if success, 0 if failure Probability distribution is x 0 1 P(X = x)p1-p Results for Bernoulli trials can be simulated using S-PLUS e.g. simulate results of a drug trial drug, success (cure) has probability p = 0.3 for each patient, 100 patients in trial. result _ rbinom(100, size=1, prob=p) result is a 100 vector that looks like 1,0,0,1,0,1,…...


Download ppt "Basics of probability Notes from: www.anu.edu.au/nceph/surfstat."

Similar presentations


Ads by Google