---start biostat 01.22.97--- handout #3 approximating distributions 100.3 Y100 Barsky in the morning: he's describing something about it. this DJ has a habit of doing phone scams where he sets people up pretending to be someone else. anyway... going back to last time....this is a general concept that should be generalizable beyond the scope of this example. this is how we figure out what is a sufficient sample size and what's a sufficient power.(he's talking about the final examples from last time...) we had it set up as an experimental procedure where we tested the null (with upper panel) and reject or not reject, based on upper panel. most of the time nulls are set up TO BE REJECTED. sometimes, you try to prove the null, but not usually. so, we expect the vaccine to WORK, not not to work. but in classical null proceduring, we set it up to test the null. NOw, the bottom panel is a planning/critiquing mechanism. if you are setting up an experiment, you need to figure out how many subjects you need, so you get a supposition from someone about how effective you think the product will work...eg, what is WORTH finding out? if you make what's worth finding SMALLER, eg, as it gets smaller, the necessary sample size gets larger.the difference between the useful and the useless - compare this to cracks in a dam. cracks of a certain size are worth finding - so you a larger or smaller magnifying glass, as needed. if you only need to find HUGE ones, don't need a glass. but the smaller the size you need to find, the bigger magnifying glass. so the glass is analagous to sample size, and the crack size is analagous to the experimental results difference from the null. so the smaller the difference you need to detect, the more expensive it gets, too. when we conduct an experiment we only consider two states of nature. either at the point you're doing the experiment the null is true, or else the null is not true. the extent of its truth or untruth is not relevant yet. the way you size it is the way you pick the numbers, based on the difference you seek under supposition (bottom panel) is what drives this mechanism to be able to suppose sample sizes. what if you aren't planning an experiment, but an experiment has been concluded, and they didn't find statistical significance. you can use the analytical technique post-hoc if you will, because if you don't find significance, either there really isn't any, or your sample size and decision rule was too small to find the difference. so you can plan an exp't and develop sample size, or evaluate the power of a failed experiment. eg if someone wants to prove a is different from b and he uses 3 pairs of monkeys, he hasn't got a good chance of proving it because sample size is so small. 3 pairs will never be significant. states of nature: null is true null is not true ----------------- -------------- ---------------- decision: reject null alpha correct ----------------- -------------- ----------------- not reject null correct beta so if you reject null, and null is actually false, you are correct. if you don't reject null, and null is true, you are correct. if you reject null and null is true, that's type I error aka alpha. if you don't reject null, and null is false, that's a type II error, aka beta. we have now concluded handout two. questions: what if supposition is wrong? eg, vaccine doesn't really work 80% of the time? well, that's why you never use the supposition in experiment - just use it for planning the experiment. thank you gallileo. note: whoever wrote notes about gallileo took it too seriously. it's not all factual....it's instructors interpretation. like, you can't call dostoyevsky an existentialist, because when d. lived, the concept of existentialism did not exist. but, what gallileo did turns out in a revisionist sense to be part and parcel of the founding of the scientific method. so, homework... there has been some concern about only having one week to do it. SO, it's going to be due the following monday HW: make up, design, completely contrive, etc - create and describe a matched pairs experiment. invent one. produce a null probability distribution, keep numbers between 4 and 10, don't use 6. need not show calculations but should set up calculation. histogram with probability should suffice. pick a null decision rule and explain it. show outcome and make decision. also. pick an alternative, and calculate the probability of detecting it under thenull rule you have chosen in item three. discuss type one, two erros, and power, in relation to the results you produce in items one to five. don't turn it in late! you will be docked. on to handout 3. this is a transition handout. pretty much noteworthy, it should suffice as notes. you can take notes if you want. but you don't have to. now we're going to utilize our learned concepts [ooooooohhhhhh] here's the deal. the first two handouts showed the exact probability basis based on binomially calculated probability that no one has problems understnading [huh?]. but, we don't really USE that in real experiments. we use approximations from well known and recognized continuous base mathematical functions which are well known. [oy] we're not getting into the math, just looking at the application of these functions. so. why is it we can use these continuous curves w/o worrying about exactness? in the very first coin tossing experiment we saw diagram one page one handout three, simple histogram. note that as n increased, number of bars increased, as depicted. the histograms have certain defined characteristics. so, note that for a large number of trials, any symmetric binomial eg coin toss expt, will approach a bell curve distribution, aka "normal" or "gaussian" curve. if you have a finite amt of space in which to draw the curve, the more subjects/data points you have, the closer you get to the actual curve. this was figured out when copernicus and friends were gathering astronomical data. their cohorts eg laplace et al noted that if you took a lot of measurements over and over again, of the same phenomena but with some error so it never came out the same again, finally bernouille noticed that if you plot the error, the error distribtion looks like the bell curve. and in biology if we look at biological variation it tends to follow the bell curve, as do things in probability. when astronauts first went to the moon....moon has less gravity like 1/6 of earth's. they took to the moon with them a quinkinnuk?? to demonstrate probability. these are boards enclosed in glass, with pins evenly spread out. you drop marbles through the top and they hit pins and proceed down. they found that gravity doesn't affect this. not EVERYTHING has a normal curve, but if you gather enough of anything that is distributed in a non-pathological way, it tends to look like normal bell curve. before proceeding, we usually take a slight tangent to look at how distributions like the normal curve are thought about more generally than just as a probability application. eg, the curve stands on its own, and to get a nicer warmer fuzzier feelign for our friend the curve we should look at it more closely. we call it gaussian, but realize many others identified it as well. moving ahead with more general thoughts about these distribution: p 2, descriptive parameters. if there is a LARGE NUMBER of variables biologically based it will look gaussian... X1, X2, X3....Xn where n=total number of SAT scores. say n represents a million people. the arithmetic average aka MEAN value of the scores = µ µ = sum of xi/n where i = 1 to n the median Md is the 50th percentile - divides scores in ordered arrangement. Md = middle score if curve is normal, triangular or cube, mean and Md are same, otherwise not. MODE Mo = most common score bell curve is distribution of outcome representation. a visual representation of results. as you get further from center in either direction, number of people obtaining scores very high or low drops off. measure of central tendency. one number which depicts all of the numbers. this is most useful when curve is symmetrical. we can also measure spread. different curves can be very diffuse or tight. spread = closeness with which scores group around central tendency. the spread or variation in population (eg, tightness of clustering of scores around mean µ) may be evaluated by the VARIANCE equation: see p 2 handout, i can't write that equation with this particular text editor :) as variation of curve increases, variance increases...eg, as wideness of curve increases, variance increases. the square root of the variance is the standard deviation ---break--- refer to handout 3 p 3 for diagram of curve which is gaussian and which has monotonically decreasing function to either side. you can find two points of steepest ascent - marked on diagram. if you drop a perpendicular from SA point to x axis, that distance is the standard deviation. the standard deviation can also be calculated from the data (scores themselves). see formula on p 3. you take all n of the individual observations, subtract the mean from each score and square the differences and add them up. then divide the sum of the squared differences by the number of observations (n), and take the square root of all of that. if curve is gaussian, this number will be the length of the horizontal line segment between the two SA points if normal curve, you can calculate score distribution by knowing that one standard deviation on either side of the mean will includ about 68% of the values in the distribution. Z scores - p 4 and 5 of handout. bottom of p 4. Z = xi - µ ------ sigma normal deviates...ha ha. say someone has an IQ of 115. the mean is 100. the sigma is 15 (stand.dev.) so Z score is one. that means that ONE standard deviation was [confused] IQ of 115 puts you in 84th percentile. equiv to SAT verbal of 600. now, look at 1.67 standard deviation p 6. that gives a z of .05 - so that's the 95th percentile. so that's equivalent to an IQ of (125-100)/15 = 1.67 so IQ of 125, w/equiv SAT score of (x-500)/100=1.67 so SAT score x = 667. he's explaining percentiles....talking about propensity to obtain scores...taking the above for what it is, the production of IQ...let's say we're looking at shoe size, or weight, or height...the probability of percents of population being over size 5 is represented on curve. no one has the guts to ask any questions, so we're moving on. going back to histogram distribution for puppy pair experiment... how can we use our new friend the gaussian curve to approximate with the puppy pair experiment? well, z = Xi - µ ------ sigma if Xi = 0 or 1 (win or loss) [he's writing some equation with n and ¼ in it but he's in front of it, i can't see it.] sample size times pi+ times 1- pi+ <-----take square root of that result, and that is sigma+. mean = sample size times proportion (pi+ = proportion) mean = 3 sample size = 6 proportion = .5 so 3 = 6 * 0.5, so that stands up. so the actual outcome is X+ -n¼+ --------- sq rt of (n¼ *(1-¼+)) so z = 6 -3 div by sq rt of 6 * .5 * .5 and you get 3/1.22 = 2.45 note when you use continuous curve and map it onto a set of discrete blocks you get discontinuity. by convention we locate the values at the centers of the histogram blocks. but by so doing, we lose half the area of the histogram block. so there is a continuity correction; stating that when you want to fit a discrete distribution to a continous curve, correct by subtracting one half the baseline value of a block. so here, you subtract one half because each block has a baseline unit of ONE. so 6-3-.5 is in numerator. so you get 2.04 as a z value, and you get prob of .021 instad of .008 so it is much closer. [huh?] so using curve, we can get probability very close to real one esp as sample size gets larger. NOW we shift to something that is NOT in the handout (though the topic is discussed in handout 4) let's generalize even further the notion beyond approximating probability, how continuous curves help us describe research. instead of using categorical data as we just did, let's look at a metric, measuring something, pounds, mm, etc. now, some harvey guy deals w/dental dz in dogs and cats...and periodontal dz is becoming a big problem in companion animals (formerly called pets). so, one of the measures or the premeire measure [drawing of tooth] the cementum-enamel junction --the attachment of gum tissue is on or near here. to assess gum dz, you assess distance between tissue and CE-J --> should be within a mm or 1.5 mm. as the dz gets worse, the gums recede (hence the phrase, long in the tooth ). to categorize this dz, we measure this in many animals and summarize the data. we look at distribution and deviation, etc. next five minutes: barsky story. sorry, i'm not writing it down. my fingers are REALLY cold. it's very cold back here. ---end----