Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
POSC 202A: Lecture 4 Probability Probability We begin with the basics of probability and then move on to expected value. Understanding probability is important because the rules that govern probabilistic relationships allow us to explicitly account for the stochastic nature of the world. We begin with some basic definitions….. Probability ProbabilityThe percentage of times something is expected to happen, when the process is infinitely repeated, under the same conditions. Probability Since it is a percentage, it ranges from 0 (never expected to occur) to 1 (it always occurs). Thus we can calculate a probability that something occurs by subtracting the probability that it does not occur from 1. Venn Diagrams The area in the rectangle=1 which is the sample space. The probability that event ‘A’ occurs is indicated by the size of the area that is covered in the space. The complement is the area in the sample space not covered by the circle ‘A’. It is abbreviated Ac. So: Ac= 1-A A Ac Probability Thus we can calculate a probability that something occurs by subtracting the probability that it does not occur from 1. Example: If a coin is 2 sided, the probability that heads will occur is 1- (the probability of tails). Probability PopulationThe entire group of things about which we want information. An estimate that describes an aspect of the population is a parameter. A parameter is a number that describes the population – in theory it is fixed, but rarely do we know it. An example: The US Census. Probability SampleA part of the population from which we actually collect information, used to draw conclusions about the population. An estimate that describes an aspect of the sample (our quantity of interest) is a a statistic. Probability RandomAn event is random when its selection can be attributed to chance. We think of random selection occurring when all units have an equal chance of being selected. Example: roll of dice. Probability: a brief tangent Sampling DistributionIs the distribution of the values of some statistic in all possible samples (of a particular size) that could be taken from a population. This is a distribution in which each observation or unit is itself the product of a sample. The sampling distribution is Normal about the true population mean. Underlying distributions converge around the sample mean as the number of trials increase. Estimating the mean of a distribution (or variable)? We can think of two ways to do this: 1. Calculate the average. -(Not always possible) 2. Simulate through repeat sampling. -In essence, we estimate the sampling distribution. Probability: a brief tangent Class exercise. Pair up. We are going to create a sampling distribution. 1. Roll the dice. (in R, hint: requires sample() function) 2. Record each roll. (Repeat 5 more times-6 total) 3. Calculate and record the average of the 6 rolls. 4. Repeat 20 times. You should have 20 averages. Each average represents the result from a sample. Probability: a brief tangent Sampling DistributionWe can create a sampling distribution of the means of all groups samples. What do we find when we graph the average of the samples? Why is this useful? Probability IndependenceTwo things are considered independent if the chances of the second occurring, given our knowledge of the first, are the same. The selection of one does not effect the chances that another is selected. Example: the second roll of the dice is unrelated to the first. Probability Example: the second roll of the dice is unrelated to the first. So the probability of any number remains 1/6. A common misperception is that the number that just came up is less likely to occur on the next roll. If that were true, what would we expect to see in our results? Probability DependentWhen the outcome of future events change due to events that precede them. The selection of one DOES effect the chance that another is selected. Dependent- vs. Independent Example: Pick a card from a deck (of 52). What is the probability of selecting any one card? If we place the card back in the deck and reselect, then the second selection is independent of the first. If we do not place the card back in the deck then the chances for selecting a particular card are dependent on the selection of the first card (1/51). Probability ReplacementRefers to returning the item selected to the sample so that the odds of selecting any one case remain unchanged (the draws remain independent). Probability Two general types of more complex processes. Conditional probability: What is the likelihood of one thing and the other happening. Joint probability: What is the probability of one thing or the other happening? Probability Conditional ProbabilityThe chance an event occurs given another event has already occurred. Conditional probability deals with dependent events (though the individual components of each step may be independent). (Think of it as a two-step process) Probability Conditional ProbabilityThe chance an event occurs given another event has already occurred. Here we are trying to find the area ‘A and B’ which is called the intersection A B A and B Probability IntersectionThe probability that all events occur. A B A and B Probability Conditional ProbabilityTo find a conditional probability, use the multiplication rule: CP=Pr(a)*(Pr(b)given (a)). Example: What are the odds of selecting the 7 of clubs and then the queen of hearts: CP=1/52*1/51 Conditional ProbabilityThe individual events can be independent or dependent. We can account for both. Assume independence. Example: What is the probability of flipping a coin and getting heads twice? Two heads=.5*.5 Conditional ProbabilityA more complex example: Assume independence. Example: What are the odds that we will draw a female Republican from a sample if the probability of drawing a female is .53 and of a Republican is .5? CP=.53*.5=.265 Conditional ProbabilityAssume dependence. Now we need the probability of B given A. In this case the proportion of Republicans among women. Example: What are the odds that we will draw a female Republican from a sample if the probability of drawing a female is .52 and of a Republican is .4? CP=.52*.4= ~.21 Conditional ProbabilityNow we need the probability of B given A. One limitation is that when the probabilities are dependent, we often don’t know what the probability of B given A is: Small Large A B A and B A B A and B Joint ProbabilityWhat is the probability that more than one outcome occurs (in a round)? (e.g., what is the probability we roll a 1 or a 3?) Joint ProbabilityTo answer this we need to know if the outcomes are mutually exclusive—does the occurrence of one event preclude the other from occurring? Joint ProbabilityAre the outcomes mutually exclusive—does the occurrence of one event preclude the other from occurring? If yes, then the events are dependent. (one depends on the other NOT occurring) If no, then the events are independent. (they can occur simultaneously) Joint ProbabilityIf yes, then the events are dependent. If No, then they are independent. A A B B Yes ‘Disjoint’ A and B No Joint ProbabilityIf yes, then the events are disjoint. To solve: we add the probabilities. Example: the probability of getting a king of clubs or queen of hearts. JP=1/52 + 1/52 Example: the probability of getting any king or any queen. JP=4/52 + 4/52 Joint ProbabilityIf no, then the events are independent. (they can occur simultaneously) To solve: we add the probabilities and then subtract their intersection. JP= (A+B)-(AxB) Joint ProbabilityTo solve: we add the probabilities and then subtract their intersection. JP= (A+B)-(AxB) Example: the probability of drawing any club or any queen. JP=(13/52+4/52)-(13/52*4/52) JP=(.25+.077)-(.25*.077) Joint ProbabilityExample: the probability of drawing a Female or a Republican in a sample. Females are 52% of the population Republicans are 40% of the population. JP=(.52+.40)-(.52*40) =(.92-.21) =71% Probability: Quick Summary Two general types of more complex processes. Conditional probability: What is the likelihood of one thing and the other happening. Joint probability: What is the probability of one thing or the other happening?