Pitman MTH 135/ STA 104 Probability Week 1: Intro, and Rules of Prob Office # Phone # Email Office-Hours Class Webpage TA Name & OH 1. Introduction and Examples What does it MEAN to say that a) The probability of Point Up for a thumbtack is P[U]=1/2? b) The probability of Heads for a 100Esc coin is P[H]=1/2? c) The probability that IBM stock rises $1 today, P[+]=1/2? Three interpretations of probability: *) Symmetry: If there are k equally-likely outcomes, each has P[E] = 1/k *) Frequency: If you can repeat an experiment indefinitely, P[E] = lim [# of occur in n tries] / [n] n->oo *) Belief: If you are indifferent between winning $1 if E occurs or winning $1 if you draw a blue chip from a box with $100p$ blue chips, rest red, P[E] = p Limitations and shortcomings of each... nested... agree where possible. Math Background: Should know: \sum_3^{100} (4/5)^k :: \int_0^10 x e^{-2x} dx :: \lim_{x->oo} x^3/e^x \lim_{n->oo} (1-2/n)^n :: (a+b)^n = \sum_0^n {n:k} a^k b^{n-k} \int\int (x+y) dx dy over triangle with vertices (0,0), (1,0), (0,1) ------------------------------ Example: If Duke, UNC, and NCSU have 800, 1000, 600 accounts on NCSC supercomputer, and if accounts are six letters starting with D, U, or S respectively, what is the probability that "UABCXY" is a valid account? Answ: 1000/26^5 ------------------------------ EXPERIMENTS and OUTCOMES An "experiment" is something we do that reveals something we didn't know, that lessens our uncertainty. Sometimes we'll call them "random experiments", especially when the "experiment" is something like drawing a card from a well- shuffled deck or rolling a die or tossing a coin, but that's really just an attitude thing--- we can view presidential elections, sporting events, or even looking to see how many pages the textbook has as "random experiments", too, where we decrease (or "resolve") uncertainty by observing something. Some of the main things we'll study in probability include: Outcome: One of an exhaustive exclusive list of everything that might happen in a random experiment. Examples: 3 coin tosses: {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} 3 coin tosses: {0,1,2,3} 3 coin tosses: {0,1,2,3,4,5,6,7} (bits in binary notation) One roll die: {1,2,3,4,5,6} Two rolls: {2,3,...,11,12} Two rolls: {11,12,...,16,21,22,...,66} (36 elts in all) Count pages: {1,2,3,...,999,1000,...} (559) Wait for bus: [0,oo) Event: A thing that might happen, and then again might not Examples: 2 heads: {HHT, HTH, THH} Even number: {2,4,6} 2 heads: {2} < 2 minutes: [0,120) Random Variable: A number that depends somehow on chance Examples: # of heads: {3, 2, 2, 1, 2, 1, 1, 0} Initial heads: {3, 2, 1, 1, 0, 0, 0, 0} 2^die: 2, 4, 8, 16, 32, 64} Pages/class day: 559/28 = 19.96429 (or 559/23 = 24.30435) [Aside on Significant Digits... 1/99 - 1/100 != 0; = 0.0001010101 or 1.0100 10^-4 or 1/9900 ---------- Apology: Probability and statistics are useful and interesting for all sorts of real-world problems-- but when we're just beginning, it's easier to think about artificially simple situations like rolling dice, tossing coins, or dealing cards than it is to work out the details of realistic problems like estimating pollution, predicting elections, or managing stock portfolios. I'll try to be more realistic sometimes, but please bear with me through the early stages with unrealistic examples. Thanks! ---------- Mathematical objects: Sample Space Omega Set of all possible "outcomes" Outcomes w Elements of Omega (seldom mentioned) Events E, F, ... Subsets of Omega Random Variable X, Y, ... Functions Omega -> IR (or -> IN or IR^2 or ...) More about events: E "and" F: Intersection (Pitman: EF) E "or" F: Union (Pitman: E u F) "not" E: Complement (Pitman: E^c) 0: Empty Set Impossibility Omega: Sample Space Certainty "at least one of E_i": (Infinite) union U E_i "all of E_i": (Infinite) intersection A E_i DeMorgan's Rules (obvious from Venn (MasterCard) Diagram): not (A and B) = (not A) or (not B) not (A or B) = (not A) and (not B) Probability assignment rules: (1) Nonnegative: P(E) >= 0 (2) Addition: P(E u F) = P(E) + P(F) **IF** E F is empty (3) Total one: P(Omega) = 1 (2') Countable addition: P(U{i=1..oo} E_i) = Sum{i=1..oo} P(E_i) **IF** each Ei Ej empty for i != j ({E_i} is called a "countable partition") Note that there are lots of events--- if Omega has n elements then there are 2^n possible events (illustrate this). SO, it's usually too hard to give a probability assignment by listing the probabilities of every event--- need an easier way. When Omega is finite we can just give the probability p(i) of each "elementary outcome" {i} in Omega; by (3) these determine everything by P(E) = sum { p(e): e in E }. This can even work for some infinite sets Omega (like the integers) IF you can list the elements e_1, e_2, ... of Omega but NOT for "bigger" infinite sets (like the real numbers)-- If we want to "pick a point at random from the unit square" or to "pick a number between zero and one", then we might want P(E) to be related to *area* or *length*, which cannot be computed by summing up any function of the infinitely-many points. We'll come back to this kind of problem later (they're fun). First let's do some examples of probability assignments following the rules. For each question give: (i) Omega (ii) A rule for computing P(E) for every event E in Omega a) Toss a thumbtack that falls Up with probability 52% (note 52% of live births are boys; this could instead be a gender question) b) Roll two fair dice. c) Toss a coin until first Head; count # of tails (only): Omega = {0,1,2,3,...} P(E)= ???? P(Even # of tails precede 1st head) = ???? ============== Why rules????????? Try: P(E) = lim{n->oo} #(E {1,2,...,n}) / n Does this make sense for all sets E?????? Try to find one for which it doesn't. --------- Suppose we define P() ONLY for the sets it Does make sense for. Are we okay now??? Well, no. Alas there are sets E, F for which P(EF) is not defined.... ============ ============ Tue Ends, Thu Begins ============ ============ Consequences of the rules ("Propositions"), or How to compute probabilities: 4.1 P(E^c) = 1 - P(E) 4.2 P(E) <= P(F) if E subset F ("E implies F", E->F) 4.3 P(EuF) = P(E) + P(F) - P(EF) (extension of Rule #3) 4.4 P(UEi) = Sum{i}(P(Ei) - Sum{i prod((366-(1:60))/365) or prod(seq(365,366-60)/365) or ... [1] 0.005877339 ------------------------------------------------------------ MatLab: >> prod((366-(1:60))/365) or prod(linspace(365,366-60)/365)... ans = 0.00588 ------------------------------------------------------------ Maple: evalf(product((366-i)/365,i=1..60)); 0.005877339 ------------------------------------------------------------ Mathematica: In[1]:= N[Product[(366-i)/365,{i,1,60}]] Out[1]= 0.005877 ------------------------------------------------------------ c: #include main(int ac, char **av) { int i, n; double p; n = (ac>1) ? atoi(av[1]) : 22; if(ac>1) n = atoi(av[1]); else exit(fprintf(stderr, "Usage: %s \n", *av)); for(i=0,p=1; i prod((366-40):365/365) = 0.1087682 > prod((366-22):365/365) = 0.5243047 ( <---R ) > prod((366-23):365/365) = 0.4927028 Note around 22 or 23 students in class guarantee 50% chance of tie. Q: In fact some b'days are more common than others (say, 9 mo. after 1st weekend in spring, or maybe after a 3-day power outage from a hurricane....); how will this affect the B'day Problem answers? Will that make ties MORE likely or LESS likely??? ------------------------------------------------------------ Limits: Sometimes we need to use approximations to compute the probability of something--- and so we'll need to know that P[ at least one of E_n occurs ] = lim P(E_n) IF E_n c E_{n+1} P[ all of F_n occur ] = lim P(F_n) IF F_{n+1} c F_n (i.e., INCREASING unions and DECREASING intersections are okay) EXAMPLE: What's the chance of at least one head if we toss a fair coin forever? ANSW: P[No head in n tosses] = (1/2)^n -> P[at least one in n ] = 1 - 2^{-n} -> 1 What's the chance of all tails if we toss a fair coin forever? ANSW: P[all tails for n tosses] = (1/2)^n -> 0 Put one brass ring and n silver ones in a hat, at time n; what's the chance we ever draw the brass one? ANSW: P[no luck in 1st n tries] = (1/2)(2/3)(3/4)...(n/n+1) = 1/n+1, so P[NEVER get brass ring] = 0. Put one brass ring and n^2 silver ones in a hat, at time n; NOW what's the chance we ever draw the brass one? ANSW: P[no luck in 1st n tries] = (1/2)(4/5)(9/10)...(n^2/n^2+1) -> 0.272... so P[NEVER get brass ring] = 0.727... ========== What IS probability??? 0. Symmetry? Try to find equally-likely outcomes. 1. Asymptotic Frequency: P(E) = lim_{n->oo} (#E in n tries)/n 2. Degrees of belief: P(E) = fraction of brass rings needed for betting on event or hat to be equally attractive ==========