mm-2429 === Subject: Re: limit question > I understand your reply as follows: > 1. in case of Q2, > lim(f(x),x->a) does exists as lim(f(x),x->a)=f(a) > 2. in case of Q1 > since 0 is not in E, lim(f(x), x -> 0) is not defined. Is my understanding correct ? Yes. > Now, I'm still wondering about the reason of lim(f(x), x -> 0) is not > defined in your reply. > Does only the fact that 0 is not in E implies lim(f(x), x -> 0) is > not defined ? As your reply logic, If g(x) is definded on R-{3} as g(x)=x-1 then > lim(g(x), x->3) does not exists because g(x) is not defined at x=3. Is it true? The problem is with the x -> 3 part of the notation. Here's an extreme example: Let A be the positive reals and g:A -> R be any function. What does lim(g(x), x -> -5) = L mean? If you try the usual e - d definition then L = 10 or Pi or whatever because for e > 0 then for every x in A such that |x + 5| < 2, |g(x) - whatever| < e vacuously. That would be unfortunate. Even if you are asked about lim(g(x), x -> 0), there are problems - that's why there are left and right hand limits in Calculus. -- Paul Sperry Columbia, SC (USA) === Subject: Can't solve hello I tried to solve the following two problems with little luck . I hope you can help A)Rhombus has circle with radius r = 6 inscribed inside of it.The difference between angles alpha and beta is a - b = 32.5 Find values of diagonals e and f B)Parallelogram ABCD with |AB| = 8, |BC| = 6.5 and angle beta b = 143.4 has area S(p) that is equal to the area of Isosceles triangle ABE ( S ( p ) == S ( t ) ) Find the values for sides of a triangle and altitude perpendicular to line |AB| ( |AE| = |BE| ) thank you === Subject: Re: Can't solve >>B)Parallelogram ABCD with |AB| = 8, |BC| = 6.5 >>and angle beta b = 143.4 has area S(p) that is >>equal to the area of Isosceles triangle ABE >>( S ( p ) == S ( t ) ) >>Find the values for sides of a triangle and altitude >>perpendicular to line |AB| ( |AE| = |BE| ) >> You were right , I really should have write down what I did so far . Here it is : a ... angle alpha of parallelogram h ... altitude perpendicular to line |AB| a = 180 - b = 36.6 h = |BC| * sin(a) = 3.9 S(p) = |AB| * h = 31.2 h(t) ... altitude of triangle perpendicular to line |AB| S(t) = |AB| * h(t) / 2 And this is as far as I can get since we have two unknowns and only one equation . Only thing I could think of is since S(p)==S(t) , and since paralellogram is made of two identical triangles , then either one of the two triangles could be identical to triangle AUE ( U point cuts in half the side AB of triangle ABE ) . >>A)Rhombus has circle with radius r = 6 inscribed >>inside of it.The difference between angles alpha and >>beta is >> a - b = 32.5 >>Find values of diagonals e and f > Call A and B half of these angles, and draw the >diagonals of the rhombus, which intersect at the >center of your circle >(why?). But why would diagonals intersect at the centre of a circle ? Do diagonals in rhombus always cut angles in half ? Could you perhaps give me a link to a site where it explains why it is that way ? It would really help me a lot >What are those angles? But let's guess, maybe they >are the two types of corner angles in the rhombus I assumed so >In any case... what is a+b? a+b=180 ? thank you for putting up with me === Subject: Re: Can't solve >>diagonals of the rhombus, which intersect at the >center of your circle >>(why?). But why would diagonals intersect at the centre of a circle ? >Do diagonals in rhombus always cut angles in half ? >Could you perhaps give me a link to a site where it explains why it is that way ? It would really >help me a lot > It can be very confusing when you combine the reply to two different authors in the same message. Use separate replies including context. Look at what happens if you draw one diagonal. You get two (isosceles!) triangles with equal corresponding sides, hence congruent. Do you see why the diagonals bisect the angles? --Lynn === Subject: Re: Can't solve has area S(p) that is >>equal to the area of Isosceles triangle ABE ( S ( p ) == S ( t ) ) Find the values for sides of a triangle and altitude >>perpendicular to line |AB| ( |AE| = |BE| ) You were right , I really should have write down what I did so far . Here it is : a ... angle alpha of parallelogram >h ... altitude perpendicular to line |AB| a = 180 - b = 36.6 h = |BC| * sin(a) = 3.9 S(p) = |AB| * h = 31.2 ok. (Logically ok; I did not check calculations.) >h(t) ... altitude of triangle perpendicular to line |AB| S(t) = |AB| * h(t) / 2 And this is as far as I can get since we have two unknowns and only one equation . Why do you think there are two unknowns? There are only three terms, and you know two of them. AB is given, and you just calculated S(t)=S(p). bob === Subject: Re: Can't solve I tried to solve the following two problems with little luck . I hope you can help A)Rhombus has circle with radius r = 6 inscribed inside of it.The difference between angles alpha and beta is a - b = 32.5 Find values of diagonals e and f > I suppose alpha and beta are the two different interior angles, with alpha the larger. Here's a hint: Call A and B half of these angles, and draw the diagonals of the rhombus, which intersect at the center of your circle (why?). This gives 4 congruent right triangles with acute angles A and B. So A + B = ? and you are given 2A - 2B = 32.5. So can you solve for A and B and use the given radius to figure out the diagonals? >B)Parallelogram ABCD with |AB| = 8, |BC| = 6.5 and angle beta b = 143.4 has area S(p) that is equal to the area of Isosceles triangle ABE ( S ( p ) == S ( t ) ) Find the values for sides of a triangle and altitude perpendicular to line |AB| ( |AE| = |BE| ) thank you Have you had trigonometry? Use the sine function... --Lynn === Subject: Re: Can't solve I tried to solve the following two problems with little luck . I hope you can help But we can help more effectively if you show what you have done so far, so we can focus on where you are stuck. It also helps to make the question clear. A)Rhombus has circle with radius r = 6 inscribed inside of it. So draw a picture. How does the r relate to the rhombus? >The difference between angles alpha and beta is a - b = 32.5 What are those angles? But let's guess, maybe they are the two types of corner angles in the rhombus? Or maybe they are the angles formed by the diagonals. In any case... what is a+b? I suspect you know, and now you have two eqn for a and b, so can solve for the angles. And you know one key dimension from the circle. Find values of diagonals e and f >B)Parallelogram ABCD with |AB| = 8, |BC| = 6.5 and angle beta b = 143.4 has area S(p) that is equal to the area of Isosceles triangle ABE ( S ( p ) == S ( t ) ) Find the values for sides of a triangle and altitude perpendicular to line |AB| ( |AE| = |BE| ) You have enough info to calculate the area of the p. Do so, and then set it equal to S(t). bob === Subject: Re: Area of rhombus thank you very much for your help Either this was ill-advised humor, or you're thumbing your nose deliberately at the point of communication that William Elliot mentioned to you. http://oakroadsystems.com/genl/unice.htm#quote -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com/ My theory was a perfectly good one. The facts were misleading. -- /The Lady Vanishes/ (1938) === Subject: Re: Area of rhombus <9166909.1122144160669.JavaMail.jakarta@nitrogen.mathforum.org> >I apologise for overlooking that >thank you very much for your help Either this was ill-advised humor, or you're thumbing your nose > deliberately at the point of communication that William Elliot > mentioned to you. http://oakroadsystems.com/genl/unice.htm#quote > file to answer those who live in instant no effort gratification. === Subject: Re: Area of rhombus Even instant gratification is to short for me! I have been know to stand in front of the microwave and say: Come on! I don't have all minute! - I think it was turned on? >>thank you very much for your help >> Either this was ill-advised humor, or you're thumbing your nose >> deliberately at the point of communication that William Elliot >> mentioned to you. >> http://oakroadsystems.com/genl/unice.htm#quote >file to answer those who live in instant no effort gratification. -- Casey === Subject: Re: Area of rhombus <29140884.1122129704068.JavaMail.jakarta@nitrogen.mathforum.org But that's the thing.Area of each of the four triangles is ( e * f/2 )/2 = e * f/4 > and so area of rhombus would be is 4 * e * f/4 = e * f > But result should be S = e * f / 2 > Not including a quote of what you're replying to and not indicating to whom you are talking is a new fangled fad that's both rude and ineffective at communicating ideas. Please learn to do better as you see us do. === Subject: Re: Flip side of Fisher Exact > 207.217.125.201: I have a given 2x2 matrix on which I perform a Fisher Exact. > This is a fictional example of the response of Dogs and Cats > when they are presented with a particular bowl of food. eat don't eat Dogs 7 0 Cats 1 8 this indicates the probability that these cell frequencies > or worse could occur. Can I subtract p from 1.0 to > obtain the opposite - the likelihood that these frequencies or > better could occur? Or does Fisher not allow that? Just some details on using the FET -- There are *two* one-tailed Fisher results that are possible; the convention says to evaluate the rare one. The usual convention is to take the sum of P's, from the most extreme through the observed counts. So, that 0.0007 might be the sum of 0.0006+ 0.0001. A theoretical alternative is to use 1/2 of P of the observed counts, but I don't know if any stat-packages use that. I believe that has remained theoretical. One theoretical advantage it has ... is for a problem like this one. If the FE were evaluated from the opposite end, the observed counts again would be included in the (conventional) sum. The sum would have all but that *most* extreme cell, say, 0.0001. [ ... ] The reason I cannot just present the 0.0007 value is that the > results of many foods are presented at one time. And if the > matrix above were exactly reversed (dogs mostly not eating and > all cats eating), Fisher would give the same result, but it > would mean the exact opposite thing regarding dogs' attraction > to the food. So I would like to differentiate the results > that show dogs' attraction and repulsion to the foods compared > to cats. Can you get people to go along with it? A lot of things can become acceptable, if you tell your audience clearly enough what you are doing, But it might be easier to justify this: Use two-tailed results and print one direction of difference in red (or bold, etc.). I'd say that p-levels are a useful screening mechanism when your data include a bunch of results that are random. They are also useful when all the Ns and margins are the same. If you are looking for the effect size in meaningful 2x2 tables, the Odds Ratio often is commensurable across tables of different sizes and margins, where the extreme p-levels seldom are. -- Rich Ulrich, wpilib@pitt.edu http://www.pitt.edu/~wpilib/index.html === Subject: Re: moments of linear transform of log-normals?? > A standard result for log normal random variables is that: E(exp{X}^k) = exp(E(X)*k - V(X)*k^2/2) Where X is normal rv (so that exp(X) is log normal) > E(X) is expected value and V(X) is variance of X Um, this is wrong. Consider k=1 Your formula has: E[exp(X)] = exp[E(X) - V(X)/2] but it's actually: E[exp(X)] = exp[E(X) + V(X)/2] Glen === Subject: clutter modeling techniques Hi. I am a newbie in stats and mostly work in digital electronics. However, one of my recent jobs is clutter modeling, which may need some guidance from stat people. Clutter modeling is the term used in radar/sonar technology. It requires finding out the distribution (with a closed form expression, of course) that best fits the given raw/scatter data. This information is useful in determining some signal processing options that can give best results, should the distribution is known. I read some literature on the topic about the techniques that can be used here. Perhaps probability paper plot, chi-square test and KS test are the ones (since they match two distributions; however in this case we need to assume a distribution for our raw data.....is this the correct method?). Are there techniques which may give netter results here. I search MATLAB and found support available for KS test and probability paper plot techniques. Since inherent job is simulation on MATLAB, plz. suggest methods for the same. KVM. === Subject: Re: clutter modeling techniques > Hi. I am a newbie in stats and mostly work in digital electronics. However, > one of my recent jobs is clutter modeling, which may need some guidance > from stat people. Clutter modeling is the term used in radar/sonar > technology. It requires finding out the distribution (with a closed > form expression, of course) that best fits the given raw/scatter data. > This information is useful in determining some signal processing > options that can give best results, should the distribution is known. What you call clutter modeling sounds like density estimation to a statistician. If you know the functional form of the distribution, such as Gaussian or Student t, you can use maximum likelihood estimation (MLE) to estimate the distribution parameters from the data. Sometimes there are analytical estimates, otherwise you can use an optimizer. This is discussed in statistics textbooks. > I read some literature on the topic about the techniques that can be > used here. Perhaps probability paper plot, chi-square test and KS test > are the ones (since they match two distributions; however in this case > we need to assume a distribution for our raw data.....is this the > correct method?). Once you have fit a distribution via MLE, you can check the goodness-of-fit using the tests you mentioned. If the fit is poor, you may need to consider a broader class of distributions. === Subject: Re: clutter modeling techniques > Hi. I am a newbie in stats and mostly work in digital electronics. However, > one of my recent jobs is clutter modeling, which may need some guidance > from stat people. Clutter modeling is the term used in radar/sonar > technology. It requires finding out the distribution (with a closed > form expression, of course) that best fits the given raw/scatter data. > This information is useful in determining some signal processing > options that can give best results, should the distribution is known. I read some literature on the topic about the techniques that can be > used here. Perhaps probability paper plot, chi-square test and KS test > are the ones (since they match two distributions; however in this case > we need to assume a distribution for our raw data.....is this the > correct method?). Search for K clutter distribution or compound K distribution on the web. This is an ill conditioned Bessel function, supposed to fit radar clutter but there are quite a few free parameters and a lot of controversy, so I don't think there are any non-messy solutions out there. The distribution depends on the weather, geometry, wavelength, plus phase of the moon, and possibly mysterious astrological factors (just half joking). There are other theories that the distribution should be based on fractals. rusty === Subject: Finding the expected length to a pattern? Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, HTHTHTHT, etc. This is not a HW problem. I am interested in the fastest approach. Because I already know how to do it using Markov chain modeling, but that takes a long time. I am trying to understand Ross' approach(but his approach is hard to understand...) so I want to see if anybody on the Internet has a better/faster/easier-understanding approach. === Subject: Re: Finding the expected length to a pattern? >Suppose I have a coin with probability of having a head H p, and tail T with >probability 1-p. What is the expected waited tosses before I get a pattern >HTTHTTH, >HTHTHTHT, If I remember correctly, the quick way when to do that when p=1/2 is to compare substrings at the left and the right ends: So for HTTHTTH H matches H (count 2^1) HT does not match TH HTT does not match TTH HTTH matches HTTH (count 2^4) HTTHT does not match THTTH HTTHTT does not match TTHTTH HTTHTTH matches HTTHTTH (count 2^7) so the expected time is 2+16+128=146 Similarly for HTHTHTHT it is 4+16+64+256=340 A curiosity (from Barry Wolk): HTHT has an expected time of 4+16=20 while THTT has an expected time of 2+16=18. But in a race to see which appears first, HTHT will beat THTT with probability 9/14. In answer to your question, my guess (based the fact that mathematics often follows patterns) is that with p not 1/2 the expected time would be for HTTHTTH p^-1 + p^-2 * (1-p)^-2 + p^-3 * (1-p)^-4 and for HTHTHTHT p^-1 * (1-p)^-1 + p^-2 * (1-p)^-2 + p^-3 * (1-p)^-3 + p^-4 * (1-p)^-4 and a little experimentation makes this seem plausible. === Subject: Re: Finding the expected length to a pattern? An unimportant : Is the ñPhysical Systemñ exclusively that the way that a series of events are connected. In particular we cannot impose (conditional probabilities) where the very nature of the random events are INDEPENDENT. These are the case of flipping coins, rolling dices, or drawing playing cards from a pack WITH REPLACEMENT. (after any draw the card is replaced in the deck which is thoroughly mixed before the following draw). In these cases we invent at will a lesser or greater probability of an event based on what was happened before it (the HISTORY does not influence the outcome the current event). A numerical Example: A regular playing deck has 52 cads of which 26 are BLACK and 36 RED. The outcome BBR, if we do not replace is ____p(n/rep) = 26/52*25/51*26/50 = 0.127 but with replacement is different __p(rep) = 26/52*26/52*28/52 = 1/2*1/2*1/2 = 0.125 because the probability to draw a BLACK card is always 0.5 and to draw RED is also 0.5. Is this simple, it is not? ___________licas_@hotmail.com === Subject: Re: Finding the expected length to a pattern? walala said: Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, > These kinds of problems can be solved very efficiently with martingales. You can look up a discussion in Ross's Stochastic Processes or in Williams' Probability with Martingales (look for the ABRACADABRA problem). Mike === Subject: Re: Finding the expected length to a pattern? > I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, etc. This is not a HW problem. I am interested in the fastest approach. Because I > already know how to do it using Markov chain modeling, but that takes a long > time. I am trying to understand Ross' approach(but his approach is hard to > understand...) so I want to see if anybody on the Internet has a > better/faster/easier-understanding approach. My apologies. I just posted a solution method using Markov chains, since I responded to a response which didn't include this paragraph. Are you interested in the fastest solution using pencil and paper? Scott -- Scott Hemphill hemphill@alumni.caltech.edu This isn't flying. This is falling, with style. -- Buzz Lightyear === Subject: Re: Finding the expected length to a pattern? > I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail T >> with >> probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, >> HTHTHTHT, >> etc. >> This is not a HW problem. I am interested in the fastest approach. >> Because I >> already know how to do it using Markov chain modeling, but that takes a >> long >> time. I am trying to understand Ross' approach(but his approach is hard >> to >> understand...) so I want to see if anybody on the Internet has a >> better/faster/easier-understanding approach. My apologies. I just posted a solution method using Markov chains, > since I responded to a response which didn't include this paragraph. > Are you interested in the fastest solution using pencil and paper? Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear Sure. I know there is a solution that only needs a few steps of pencil and paper... It is in Ross 8th Edition of Introduction to Probability Models... But I don't understand it so I don't know how to generalize that approach. It needs to first decompose the string HTHTHTT to maximal substrings, etc... Does anybody know how to do it? === Subject: Re: Finding the expected length to a pattern? > I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail T >> with >> probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, >> HTHTHTHT, >> etc. >> This is not a HW problem. I am interested in the fastest approach. >> Because I >> already know how to do it using Markov chain modeling, but that takes a >> long >> time. I am trying to understand Ross' approach(but his approach is hard >> to >> understand...) so I want to see if anybody on the Internet has a >> better/faster/easier-understanding approach. My apologies. I just posted a solution method using Markov chains, > since I responded to a response which didn't include this paragraph. > Are you interested in the fastest solution using pencil and paper? Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear > Sure. I know there is a solution that only needs a few steps of pencil and > paper... It is in Ross 8th Edition of Introduction to Probability Models... But I don't understand it so I don't know how to generalize that approach. It needs to first decompose the string HTHTHTT to maximal substrings, > etc... Does anybody know how to do it? Here are the mechanics. (See your reference for a proof as to why this works.) I'll use your HTTHTTH as an example. For the first toss, bettor number one joins the game with a total wealth of 1 unit. He places a bet on H. If he loses, he leaves the game with zero wealth. If he wins he receives a payout of 1/p units. The game is fair, because he has a 1-p chance of zero and a p chance of 1/p units, for an expected value of 1 unit. If he loses, he retires from the game. If we wins, he bets all his wealth on T for the second toss. Again, if he loses, he leaves with nothing. If he wins, his total wealth will now be 1/p * 1/(1-p) to make it fair. He will continue in this manner, betting successively on the the remaining letters ..THTTH to finish the pattern in the successive tosses. If he wins, he leaves the game with 1/p^3 * 1/(1-p)^4 units, reflecting 3 bets on heads and 4 bets on tails. Also, for the second toss, a second bettor joins the game, bringing with him his total wealth of 1 unit. He places his bet on the first letter of the pattern, H. He follows the same procedure that the first bettor does, just one toss later. Each new toss brings one new bettor to the game. When a bettor finally wins, the total wealth in the game will be owned by three bettors: the one who just won, having bet on HTTHTTH, with a total wealth of 1/p^3 * 1/(1-p)^4. the one who came in three tosses later, having been successful so far with HTTH, and having a total wealth of 1/p^2 * 1/(1-p)^2. the one who came in six tosses later, having just bet on the first H in the pattern, and having a total wealth of 1/p. So the total wealth (no matter how many tosses have occurred) is 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p But since each new bettor increases the expected total wealth of the whole group by 1 unit when he joins the game, the expected number of betters (which is the same as the expected number of tosses) is the above number: 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p Scott -- Scott Hemphill hemphill@alumni.caltech.edu This isn't flying. This is falling, with style. -- Buzz Lightyear === Subject: Re: Finding the expected length to a pattern? >> I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail > T > with > probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, > HTHTHTHT, >> etc. >> This is not a HW problem. I am interested in the fastest approach. > Because I > already know how to do it using Markov chain modeling, but that takes > a > long > time. I am trying to understand Ross' approach(but his approach is > hard > to > understand...) so I want to see if anybody on the Internet has a > better/faster/easier-understanding approach. >> My apologies. I just posted a solution method using Markov chains, >> since I responded to a response which didn't include this paragraph. >> Are you interested in the fastest solution using pencil and paper? >> Scott >> -- >> Scott Hemphill hemphill@alumni.caltech.edu >> This isn't flying. This is falling, with style. -- Buzz Lightyear >> Sure. I know there is a solution that only needs a few steps of pencil >> and >> paper... >> It is in Ross 8th Edition of Introduction to Probability Models... >> But I don't understand it so I don't know how to generalize that >> approach. >> It needs to first decompose the string HTHTHTT to maximal substrings, >> etc... >> Does anybody know how to do it? Here are the mechanics. (See your reference for a proof as to why this > works.) I'll use your HTTHTTH as an example. For the first toss, bettor number one joins the game with a total wealth > of 1 unit. He places a bet on H. If he loses, he leaves the game with > zero wealth. If he wins he receives a payout of 1/p units. The game is > fair, because he has a 1-p chance of zero and a p chance of 1/p units, > for an expected value of 1 unit. If he loses, he retires from the game. > If we wins, he bets all his wealth on T for the second toss. Again, > if he loses, he leaves with nothing. If he wins, his total wealth will > now be 1/p * 1/(1-p) to make it fair. He will continue in this manner, > betting successively on the the remaining letters ..THTTH to finish > the pattern in the successive tosses. If he wins, he leaves the game > with 1/p^3 * 1/(1-p)^4 units, reflecting 3 bets on heads and 4 bets on > tails. Also, for the second toss, a second bettor joins the game, bringing with > him his total wealth of 1 unit. He places his bet on the first letter > of the pattern, H. He follows the same procedure that the first bettor > does, just one toss later. Each new toss brings one new bettor to the game. When a bettor finally wins, the total wealth in the game will be owned > by three bettors: the one who just won, having bet on HTTHTTH, with a total wealth > of 1/p^3 * 1/(1-p)^4. the one who came in three tosses later, having been successful so far > with HTTH, and having a total wealth of 1/p^2 * 1/(1-p)^2. the one who came in six tosses later, having just bet on the first > H in the pattern, and having a total wealth of 1/p. So the total wealth (no matter how many tosses have occurred) is 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p But since each new bettor increases the expected total wealth of the > whole group by 1 unit when he joins the game, the expected number of > betters (which is the same as the expected number of tosses) is the > above number: 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear Hi Scott, This method works like magic. Do you have elobaration in plain language explaining why a string pattern should be decomposed in such a way and the final expected waiting time is the sum of all these probabilities for each decomposed substring pattern? It was just this blockade in mind that I could not go through Ross' approach. Why does the sum of probabilities become a expected length? === Subject: Re: Finding the expected length to a pattern? > This method works like magic. Do you have elobaration in plain language > explaining why a string pattern should be decomposed in such a way and the > final expected waiting time is the sum of all these probabilities for each > decomposed substring pattern? It was just this blockade in mind that I could not go through Ross' > approach. Why does the sum of probabilities become a expected length? There is no sum of probabilities. It is the expected wealth which becomes an expected length. The reason is that the number of bettors is the same as the number of tosses. Each new bettor brings one unit of wealth, and his expected wealth remains 1 throughout the game because it is fair. So the expected total wealth is 1 times the number of bettors, which is the same as the number of tosses. Scott -- Scott Hemphill hemphill@alumni.caltech.edu This isn't flying. This is falling, with style. -- Buzz Lightyear === Subject: Re: Finding the expected length to a pattern? I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail > T > with > probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, > HTHTHTHT, >> etc. >> This is not a HW problem. I am interested in the fastest approach. > Because I > already know how to do it using Markov chain modeling, but that takes > a > long > time. I am trying to understand Ross' approach(but his approach is > hard > to > understand...) so I want to see if anybody on the Internet has a > better/faster/easier-understanding approach. >> My apologies. I just posted a solution method using Markov chains, >> since I responded to a response which didn't include this paragraph. >> Are you interested in the fastest solution using pencil and paper? >> Scott >> -- >> Scott Hemphill hemphill@alumni.caltech.edu >> This isn't flying. This is falling, with style. -- Buzz Lightyear >> Sure. I know there is a solution that only needs a few steps of pencil >> and >> paper... >> It is in Ross 8th Edition of Introduction to Probability Models... >> But I don't understand it so I don't know how to generalize that >> approach. >> It needs to first decompose the string HTHTHTT to maximal substrings, >> etc... >> Does anybody know how to do it? Here are the mechanics. (See your reference for a proof as to why this > works.) I'll use your HTTHTTH as an example. For the first toss, bettor number one joins the game with a total wealth > of 1 unit. He places a bet on H. If he loses, he leaves the game with > zero wealth. If he wins he receives a payout of 1/p units. The game is > fair, because he has a 1-p chance of zero and a p chance of 1/p units, > for an expected value of 1 unit. If he loses, he retires from the game. > If we wins, he bets all his wealth on T for the second toss. Again, > if he loses, he leaves with nothing. If he wins, his total wealth will > now be 1/p * 1/(1-p) to make it fair. He will continue in this manner, > betting successively on the the remaining letters ..THTTH to finish > the pattern in the successive tosses. If he wins, he leaves the game > with 1/p^3 * 1/(1-p)^4 units, reflecting 3 bets on heads and 4 bets on > tails. Also, for the second toss, a second bettor joins the game, bringing with > him his total wealth of 1 unit. He places his bet on the first letter > of the pattern, H. He follows the same procedure that the first bettor > does, just one toss later. Each new toss brings one new bettor to the game. When a bettor finally wins, the total wealth in the game will be owned > by three bettors: the one who just won, having bet on HTTHTTH, with a total wealth > of 1/p^3 * 1/(1-p)^4. the one who came in three tosses later, having been successful so far > with HTTH, and having a total wealth of 1/p^2 * 1/(1-p)^2. the one who came in six tosses later, having just bet on the first > H in the pattern, and having a total wealth of 1/p. So the total wealth (no matter how many tosses have occurred) is 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p But since each new bettor increases the expected total wealth of the > whole group by 1 unit when he joins the game, the expected number of > betters (which is the same as the expected number of tosses) is the > above number: 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear Hi Scott, This method works like magic. Do you have elobaration in plain language > explaining why a string pattern should be decomposed in such a way and the > final expected waiting time is the sum of all these probabilities for each > decomposed substring pattern? It was just this blockade in mind that I could not go through Ross' > approach. Why does the sum of probabilities become a expected length? > I think Scott's post is very clear, but there is one point which could be spelled out a little more. The game is fair, so the expected amount paid out by the casino during the course of the game is equal to the expected amount paid to the casino. Scott's argument shows that the casino must pay the winning bettor an amount X. On the other hand, since each bettor pays one dollar to play, the expected amount paid into the casino is equal to the number of bettors. Thus the expected number of bettors is equal to X. There is one new bettor for each flip of the coin, so the expected number of flips is X. The rigorous version of this argument relies on martingale theory, and in particular the Optional Stopping Theorem. This is covered, as I mentioned in another post below, in Williams's Probability with Martingales. Mike === Subject: Re: Finding the expected length to a pattern? >> I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail > T > with > probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, > HTHTHTHT, >> etc. >> This is not a HW problem. I am interested in the fastest approach. > Because I > already know how to do it using Markov chain modeling, but that takes > a > long > time. I am trying to understand Ross' approach(but his approach is > hard > to > understand...) so I want to see if anybody on the Internet has a > better/faster/easier-understanding approach. >> My apologies. I just posted a solution method using Markov chains, >> since I responded to a response which didn't include this paragraph. >> Are you interested in the fastest solution using pencil and paper? >> Scott >> -- >> Scott Hemphill hemphill@alumni.caltech.edu >> This isn't flying. This is falling, with style. -- Buzz Lightyear >> Sure. I know there is a solution that only needs a few steps of pencil >> and >> paper... >> It is in Ross 8th Edition of Introduction to Probability Models... >> But I don't understand it so I don't know how to generalize that >> approach. >> It needs to first decompose the string HTHTHTT to maximal substrings, >> etc... >> Does anybody know how to do it? Here are the mechanics. (See your reference for a proof as to why this > works.) I'll use your HTTHTTH as an example. For the first toss, bettor number one joins the game with a total wealth > of 1 unit. He places a bet on H. If he loses, he leaves the game with > zero wealth. If he wins he receives a payout of 1/p units. The game is > fair, because he has a 1-p chance of zero and a p chance of 1/p units, > for an expected value of 1 unit. If he loses, he retires from the game. > If we wins, he bets all his wealth on T for the second toss. Again, > if he loses, he leaves with nothing. If he wins, his total wealth will > now be 1/p * 1/(1-p) to make it fair. He will continue in this manner, > betting successively on the the remaining letters ..THTTH to finish > the pattern in the successive tosses. If he wins, he leaves the game > with 1/p^3 * 1/(1-p)^4 units, reflecting 3 bets on heads and 4 bets on > tails. Also, for the second toss, a second bettor joins the game, bringing with > him his total wealth of 1 unit. He places his bet on the first letter > of the pattern, H. He follows the same procedure that the first bettor > does, just one toss later. Each new toss brings one new bettor to the game. When a bettor finally wins, the total wealth in the game will be owned > by three bettors: the one who just won, having bet on HTTHTTH, with a total wealth > of 1/p^3 * 1/(1-p)^4. the one who came in three tosses later, having been successful so far > with HTTH, and having a total wealth of 1/p^2 * 1/(1-p)^2. the one who came in six tosses later, having just bet on the first > H in the pattern, and having a total wealth of 1/p. So the total wealth (no matter how many tosses have occurred) is 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p But since each new bettor increases the expected total wealth of the > whole group by 1 unit when he joins the game, the expected number of > betters (which is the same as the expected number of tosses) is the > above number: 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear Hi Scott, Ross' approach in his Introduction to Probability Models 8th Edition. But your bettor and casino analogy is a brand new one. Do you have a reference for this analogy along this line? Can you also show more example about how to decompose string pattern into max sub string pattern? In your above derivation, I also don't understand why at the end of the game, there are 3 bettors... There should be 7 bettors, am I right? === Subject: Re: Finding the expected length to a pattern? > Here are the mechanics. (See your reference for a proof as to why this > works.) I'll use your HTTHTTH as an example. For the first toss, bettor number one joins the game with a total wealth > of 1 unit. He places a bet on H. If he loses, he leaves the game with > zero wealth. If he wins he receives a payout of 1/p units. The game is > fair, because he has a 1-p chance of zero and a p chance of 1/p units, > for an expected value of 1 unit. If he loses, he retires from the game. > If we wins, he bets all his wealth on T for the second toss. Again, > if he loses, he leaves with nothing. If he wins, his total wealth will > now be 1/p * 1/(1-p) to make it fair. He will continue in this manner, > betting successively on the the remaining letters ..THTTH to finish > the pattern in the successive tosses. If he wins, he leaves the game > with 1/p^3 * 1/(1-p)^4 units, reflecting 3 bets on heads and 4 bets on > tails. Also, for the second toss, a second bettor joins the game, bringing with > him his total wealth of 1 unit. He places his bet on the first letter > of the pattern, H. He follows the same procedure that the first bettor > does, just one toss later. Each new toss brings one new bettor to the game. When a bettor finally wins, the total wealth in the game will be owned > by three bettors: the one who just won, having bet on HTTHTTH, with a total wealth > of 1/p^3 * 1/(1-p)^4. the one who came in three tosses later, having been successful so far > with HTTH, and having a total wealth of 1/p^2 * 1/(1-p)^2. the one who came in six tosses later, having just bet on the first > H in the pattern, and having a total wealth of 1/p. So the total wealth (no matter how many tosses have occurred) is 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p But since each new bettor increases the expected total wealth of the > whole group by 1 unit when he joins the game, the expected number of > betters (which is the same as the expected number of tosses) is the > above number: 1/p^3 * 1/(1-p)^4 + 1/p^2 * 1/(1-p)^2 + 1/p Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear Hi Scott, Ross' approach in his Introduction to Probability Models 8th Edition. But > your bettor and casino analogy is a brand new one. Do you have a > reference for this analogy along this line? Can you also show more example > about how to decompose string pattern into max sub string pattern? In your above derivation, I also don't understand why at the end of the > game, there are 3 bettors... There should be 7 bettors, am I right? There were 7 bettors, but at the time that the first one wins, 4 of the others have lost. HTTHTTH The winning better bet on these tosses H..... The next bettor lost on his first bet on H. H.... The next bettor lost on his first bet on H. HTTH The next bettor's bets match all the tosses so far. H.. The next bettor lost on his first bet on H. H. The next bettor lost on his first bet on H. H The last bettor to join the game bet on H and won. The three bettors still in the game are the 1st, 4th and 7th in this list. Scott -- Scott Hemphill hemphill@alumni.caltech.edu This isn't flying. This is falling, with style. -- Buzz Lightyear === Subject: Re: Finding the expected length to a pattern? > Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, I don't know if this is exactly what you want, but the expected number of trials (t) to achieve m successes is t = m/p where p is the probability of 1 success. For example, to get 4 sixes when rolling a single die, you would expect to have to roll it t = 4/(1/6) = 24 times. But that's not the same as getting 4 sixes in a row. With a coin, the probability of getting HHHH is 1/16. The pattern of consecutive H (or T) forms a negaitve binomial distribution. That means if you flip until the HHHH pattern comes up, you will have twice as many HHH paterns as HHHH, twice as many HH as HHH and twice as many H as HH. So if we stop at the first occurence of HHHH, there are 1 HHHH 2 HHH 4 HH 8 H The total H that occured is then 1 * 4 = 4 2 * 3 = 6 4 * 2 = 8 8 * 1 = 8 --------- 26 Now since H only accounts for half the flips, there were 26 T also. So it takes 52 flips to get HHHH. etc. This is not a HW problem. I am interested in the fastest approach. Because I > already know how to do it using Markov chain modeling, but that takes a long > time. I am trying to understand Ross' approach(but his approach is hard to > understand...) so I want to see if anybody on the Internet has a > better/faster/easier-understanding approach. > === Subject: Re: Finding the expected length to a pattern? > Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, I don't know if this is exactly what you want, but the expected > number of trials (t) to achieve m successes is t = m/p where p is the probability of 1 success. For example, to get 4 sixes when rolling a single die, you would > expect to have to roll it t = 4/(1/6) = 24 times. But that's not the same as getting 4 sixes in a row. With a coin, the probability of getting HHHH is 1/16. The pattern > of consecutive H (or T) forms a negaitve binomial distribution. > That means if you flip until the HHHH pattern comes up, you will > have twice as many HHH paterns as HHHH, twice as many HH as HHH > and twice as many H as HH. So if we stop at the first occurence of > HHHH, there are 1 HHHH > 2 HHH > 4 HH > 8 H The total H that occured is then 1 * 4 = 4 > 2 * 3 = 6 > 4 * 2 = 8 > 8 * 1 = 8 > --------- > 26 Now since H only accounts for half the flips, there were 26 T also. > So it takes 52 flips to get HHHH. This is not correct. The right answer is that it takes 30 flips to get HHHH (with a fair coin). One way to see this is as follows: Let X be the expected number of flips to get HHHH. A. If we start T, it takes X more flips on average to get HHHH. B. If we start HT, it takes X more flips on average to get HHHH. C. If we start HHT, it takes X more flips on average to get HHHH. D. If we start HHHT, it takes X more flips on average to get HHHH. E. IF we start HHHH, it takes 4 flips on average to get HHHH (duh). Combining the five cases, we get the equation X = (1/2)*(X+1) + (1/4)*(X+2) + (1/8)*(X+3)+ (1/16)*(X+4) + (1/6)*4 Solving for X gives X = 30. Mike Mike === Subject: Re: Finding the expected length to a pattern? >> Hi all, >> I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail T with >> probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, >> HTHTHTHT, >> I don't know if this is exactly what you want, but the expected >> number of trials (t) to achieve m successes is >> t = m/p >> where p is the probability of 1 success. >> For example, to get 4 sixes when rolling a single die, you would >> expect to have to roll it >> t = 4/(1/6) = 24 >> times. But that's not the same as getting 4 sixes in a row. >> With a coin, the probability of getting HHHH is 1/16. The pattern >> of consecutive H (or T) forms a negaitve binomial distribution. >> That means if you flip until the HHHH pattern comes up, you will >> have twice as many HHH paterns as HHHH, twice as many HH as HHH >> and twice as many H as HH. So if we stop at the first occurence of >> HHHH, there are >> 1 HHHH >> 2 HHH >> 4 HH >> 8 H >> The total H that occured is then >> 1 * 4 = 4 >> 2 * 3 = 6 >> 4 * 2 = 8 >> 8 * 1 = 8 >> --------- >> 26 >> Now since H only accounts for half the flips, there were 26 T also. >> So it takes 52 flips to get HHHH. >This is not correct. The right answer is that it takes 30 flips to get >HHHH (with a fair coin). One way to see this is as follows: >Let X be the expected number of flips to get HHHH. >A. If we start T, it takes X more flips on average to get HHHH. >B. If we start HT, it takes X more flips on average to get HHHH. >C. If we start HHT, it takes X more flips on average to get HHHH. >D. If we start HHHT, it takes X more flips on average to get HHHH. >E. IF we start HHHH, it takes 4 flips on average to get HHHH (duh). >Combining the five cases, we get the equation >X = (1/2)*(X+1) + (1/4)*(X+2) + (1/8)*(X+3)+ (1/16)*(X+4) + (1/6)*4 >Solving for X gives X = 30. >Mike This is essentially the same as the Markov Chain approach. There are four states, plus the absorbing state, and one wants to find the expected time to the absorbing state. A state in this simple problem is the number of consecutive head which have been observed since the last tail. The transition probabilities are 0 -> 0 1-p 0 -> 1 p 1 -> 0 1-p 1 -> 2 p 2 -> 0 1-p 2 -> 3 p 3 -> 0 1-p 3 -> end p -- This address is for information only. I do not claim that these views are those of the Statistics Department or of Purdue University. Herman Rubin, Department of Statistics, Purdue University hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558 === Subject: Re: Finding the expected length to a pattern? On 21 Jul 2005 10:04:19 -0700, Mike Hochster ... >> With a coin, the probability of getting HHHH is 1/16. The pattern >> of consecutive H (or T) forms a negaitve binomial distribution. >> That means if you flip until the HHHH pattern comes up, ... >> ... >> So it takes 52 flips to get HHHH. This is not correct. The right answer is that it takes 30 flips to get >HHHH (with a fair coin). One way to see this is as follows: Let X be the expected number of flips to get HHHH. A. If we start T, it takes X more flips on average to get HHHH. >B. If we start HT, it takes X more flips on average to get HHHH. >C. If we start HHT, it takes X more flips on average to get HHHH. >D. If we start HHHT, it takes X more flips on average to get HHHH. >E. IF we start HHHH, it takes 4 flips on average to get HHHH (duh). Combining the five cases, we get the equation >X = (1/2)*(X+1) + (1/4)*(X+2) + (1/8)*(X+3)+ (1/16)*(X+4) + (1/6)*4 >Solving for X gives X = 30. Mike > Great solution, so clear and simple. quasi === Subject: Re: Finding the expected length to a pattern? > Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, I don't know if this is exactly what you want, but the expected > number of trials (t) to achieve m successes is t = m/p where p is the probability of 1 success. For example, to get 4 sixes when rolling a single die, you would > expect to have to roll it t = 4/(1/6) = 24 times. But that's not the same as getting 4 sixes in a row. With a coin, the probability of getting HHHH is 1/16. The pattern > of consecutive H (or T) forms a negaitve binomial distribution. > That means if you flip until the HHHH pattern comes up, you will > have twice as many HHH paterns as HHHH, twice as many HH as HHH > and twice as many H as HH. So if we stop at the first occurence of > HHHH, there are 1 HHHH > 2 HHH > 4 HH > 8 H The total H that occured is then 1 * 4 = 4 > 2 * 3 = 6 > 4 * 2 = 8 > 8 * 1 = 8 > --------- > 26 Now since H only accounts for half the flips, there were 26 T also. > So it takes 52 flips to get HHHH. > This is not correct. The right answer is that it takes 30 flips to get > HHHH (with a fair coin). One way to see this is as follows: Let X be the expected number of flips to get HHHH. A. If we start T, it takes X more flips on average to get HHHH. > B. If we start HT, it takes X more flips on average to get HHHH. > C. If we start HHT, it takes X more flips on average to get HHHH. > D. If we start HHHT, it takes X more flips on average to get HHHH. > E. IF we start HHHH, it takes 4 flips on average to get HHHH (duh). Combining the five cases, we get the equation > X = (1/2)*(X+1) + (1/4)*(X+2) + (1/8)*(X+3)+ (1/16)*(X+4) + (1/6)*4 > Solving for X gives X = 30. > Yeah, but my program shows that it takes...30. Oops. Mike === Subject: Re: Finding the expected length to a pattern? Hi Kiki > Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, > Could you please elucidiate what you mean by a pattern? HHTHHTT is as much a pattern as HTHTHTHT as is HHHTTHHH as is HTHHHTHTHHH Gsax === Subject: Re: Finding the expected length to a pattern? > Hi Kiki > Hi all, I am interested in the following problem: Suppose I have a coin with probability of having a head H p, and tail T with > probability 1-p. What is the expected waited tosses before I get a pattern HTTHTTH, > HTHTHTHT, > Could you please elucidiate what you mean by a pattern? HHTHHTT is as much a pattern as HTHTHTHT as is HHHTTHHH as is HTHHHTHTHHH I expect Kiki means the specific string HTTHTTH as one problem, and the specific string HTHTHTHT as another. Here's how to solve such a problem. I'll work on finding the expected number of tosses of another string. You can use this technique on the strings you are interested in. I'll choose HTHTT. First I define states that represent the partial progress towards the desired goal. State I is the initial state. Tossing H takes you to state H. Tossing T takes you back to state I. State H. Tossing T takes you to state HT. Tossing H takes you to state H. (you don't have to start completely over since you have already tossed an H. State HT. Tossing H takes you to state HTH. Tossing T takes you to state I. State HTH. Tossing T takes you to state HTHT. Tossing H takes you to state H. State HTHT. Tossing T takes you to state HTHTT. Tossing H takes you to state HTH. State HTHTT. This is the goal. There are no further states. Now I construct a transition matrix, which defines the probabilities of moving from one state to another. T = 1-p p 0 0 0 0 0 p 1-p 0 0 0 1-p 0 0 p 0 0 0 p 0 0 1-p 0 0 0 0 p 0 1-p 0 0 0 0 0 0 Now I define a state vector x_k, which contains the probabilities of being in each of these states. The initial state vector x_0 is {1,0,0,0,0,0}, i.e. the probability of being in state I is one. After one toss, the state vector x_1 = x_0 . T = {1-p,p,0,0,0,0}. After two tosses, the state vector is x_2 = x_1 . T = x_0 . T^2 = {1-2p+p^2,p,p-p^2,0,0,0}. In general, after k tosses, x_k = x_0 . T^k. We are interested in the probability that the goal is reached on the k'th toss, which is the last position in the state vector. We can select this position by multiplying by the column vector (0) (0) s = (0) (0) (0) (1) So the probability of achieving the goal after exactly k tosses is x_0 . T^k . s The expected number of tosses is then: Sum(k=0,Infinity; k x_0 . T^k . s) This sum can be rewritten as: x_0 . Sum(k=0,Infinity; k T^k) . s If t is a scalar, it isn't too hard to show that Sum(k=0,Infinity; k t^k) is t/(1-t)^2 (with some restrictions on t, so that the sum converges). There is a similar result for a matrix T: Sum(k=0,Infinity; k T^k) = T . (I-T)^-2 (again, with some restrictions on T, which are satisifed in this case, so that the sum converges). I-T = p -p 0 0 0 0 0 1-p p-1 0 0 0 p-1 0 1 -p 0 0 0 -p 0 1 p-1 0 0 0 0 -p 1 p-1 0 0 0 0 0 1 The inverse of this is, well, a little messy. Here it's good to have a math package: This is Mathematica's output: 1 -1 + p - p -2 1 -2 1 {{-------, -----------, (-1 + p) + -, (-1 + p) , -----, 1}, 2 3 3 p 1 - p p - p (-1 + p) p 2 1 -2 -1 + p - p -2 1 -2 1 > {----- + p , -----------, (-1 + p) + -, (-1 + p) , -----, 1}, 1 - p 3 p 1 - p (-1 + p) p 1 -2 -3 1 -2 1 -2 1 > {----- + p , -(-1 + p) + -, (-1 + p) + -, (-1 + p) , -----, 1}, 1 - p p p 1 - p 1 -3 -2 -2 1 > {------, -(-1 + p) , (-1 + p) , (-1 + p) , -----, 1}, 2 1 - p p - p 1 p p p 1 > {-----, -(---------), ---------, ---------, -----, 1}, 1 - p 3 2 2 1 - p (-1 + p) (-1 + p) (-1 + p) > {0, 0, 0, 0, 0, 1}} So now all you do is square this, multiply by T, multiply on the left by x0 and on the right by s, and you get: 1 ----------- p^2 (1-p)^3 Scott -- Scott Hemphill hemphill@alumni.caltech.edu This isn't flying. This is falling, with style. -- Buzz Lightyear === Subject: Re: Finding the expected length to a pattern? > Hi Kiki >> Hi all, >> I am interested in the following problem: >> Suppose I have a coin with probability of having a head H p, and tail T >> with >> probability 1-p. >> What is the expected waited tosses before I get a pattern >> HTTHTTH, >> HTHTHTHT, >> Could you please elucidiate what you mean by a pattern? >> HHTHHTT >> is as much a pattern as >> HTHTHTHT >> as is >> HHHTTHHH >> as is >> HTHHHTHTHHH I expect Kiki means the specific string HTTHTTH as one problem, and > the specific string HTHTHTHT as another. Here's how to solve such a > problem. I'll work on finding the expected number of tosses of another string. You > can use this technique on the strings you are interested in. I'll choose > HTHTT. First I define states that represent the partial progress towards the > desired goal. State I is the initial state. > Tossing H takes you to state H. > Tossing T takes you back to state I. State H. > Tossing T takes you to state HT. > Tossing H takes you to state H. (you don't have to start completely over > since you have already tossed an H. State HT. > Tossing H takes you to state HTH. > Tossing T takes you to state I. State HTH. > Tossing T takes you to state HTHT. > Tossing H takes you to state H. State HTHT. > Tossing T takes you to state HTHTT. > Tossing H takes you to state HTH. State HTHTT. > This is the goal. There are no further states. Now I construct a transition matrix, which defines the probabilities of > moving from one state to another. T = > 1-p p 0 0 0 0 > 0 p 1-p 0 0 0 > 1-p 0 0 p 0 0 > 0 p 0 0 1-p 0 > 0 0 0 p 0 1-p > 0 0 0 0 0 0 Now I define a state vector x_k, which contains the probabilities of being > in > each of these states. The initial state vector x_0 is {1,0,0,0,0,0}, i.e. > the probability of being in state I is one. After one toss, the state > vector > x_1 = x_0 . T = {1-p,p,0,0,0,0}. After two tosses, the state vector is > x_2 = x_1 . T = x_0 . T^2 = {1-2p+p^2,p,p-p^2,0,0,0}. In general, after > k tosses, x_k = x_0 . T^k. We are interested in the probability that the goal is reached on the k'th > toss, which is the last position in the state vector. We can select this > position by multiplying by the column vector (0) > (0) > s = (0) > (0) > (0) > (1) So the probability of achieving the goal after exactly k tosses is > x_0 . T^k . s The expected number of tosses is then: Sum(k=0,Infinity; k x_0 . T^k . s) This sum can be rewritten as: x_0 . Sum(k=0,Infinity; k T^k) . s If t is a scalar, it isn't too hard to show that Sum(k=0,Infinity; k t^k) > is > t/(1-t)^2 (with some restrictions on t, so that the sum converges). There is a similar result for a matrix T: Sum(k=0,Infinity; k T^k) = T . (I-T)^-2 (again, with some restrictions on > T, > which are satisifed in this case, so that the sum converges). I-T = > p -p 0 0 0 0 > 0 1-p p-1 0 0 0 > p-1 0 1 -p 0 0 > 0 -p 0 1 p-1 0 > 0 0 0 -p 1 p-1 > 0 0 0 0 0 1 The inverse of this is, well, a little messy. Here it's good to have a > math package: This is Mathematica's output: 1 -1 + p - p -2 1 -2 1 > {{-------, -----------, (-1 + p) + -, (-1 + p) , -----, 1}, > 2 3 3 p 1 - p > p - p (-1 + p) p 2 > 1 -2 -1 + p - p -2 1 -2 1 >> {----- + p , -----------, (-1 + p) + -, (-1 + p) , -----, 1}, > 1 - p 3 p 1 - p > (-1 + p) p 1 -2 -3 1 -2 1 -2 1 >> {----- + p , -(-1 + p) + -, (-1 + p) + -, (-1 + p) , -----, 1}, > 1 - p p p 1 - p 1 -3 -2 -2 1 >> {------, -(-1 + p) , (-1 + p) , (-1 + p) , -----, 1}, > 2 1 - p > p - p 1 p p p 1 >> {-----, -(---------), ---------, ---------, -----, 1}, > 1 - p 3 2 2 1 - p > (-1 + p) (-1 + p) (-1 + p) > {0, 0, 0, 0, 0, 1}} So now all you do is square this, multiply by T, multiply on the left by > x0 and on the right by s, and you get: 1 > ----------- > p^2 (1-p)^3 Scott > -- > Scott Hemphill hemphill@alumni.caltech.edu > This isn't flying. This is falling, with style. -- Buzz Lightyear 1. How do you verify your result is correct? 2. Suppose you are given only 5 minutes with paper&pencil, can you do it? Ulises === Subject: Announcement: New Distribution Fitting Software MathWave Technologies is pleased to announce the release of EasyFit v1.1 for Windows platforms. EasyFit is a new distribution fitting program intended to facilitate probability data analysis and best model selection. It provides a complete set of features allowing to fit probability distributions to your data, analyze the results and select the model which best describes the data. Program features include: - classical & advanced distributions; - automatic parameter estimation procedures; - goodness of fit tests; - high-quality graphs; - data import; - easy to use interface. To learn more about EasyFit and download a free trial version, please visit our website at: http://www.mathwave.com/products/easyfit.html Ordering information, including product pricing and discounts, is available at http://www.mathwave.com/order.html If you have any questions, comments or suggestions regarding EasyFit, please do not hesitate to contact us at support@mathwave.com The most active users will get a free registration. We look forward to hearing from you. Antony Drokin Founder, MathWave Technologies http://www.mathwave.com === Subject: mixing distributions Hallo, the problem is as follows: I have a dataset and want to fit a distribution on it. I found that in the left area e.g. a lognormal distribution fits very well and in the right area the pareto distr fits very well. First I tried to put them together via splicing. That means, the compound distr is a defined as lognormal below x=u and as pareto else. But the problem with this approach is that I have to chose a single u, whats sometimes quiet difficult. So I think of a modification ... why setting u as fixum instead of taking a mixing of the both functions? The Idea is: I sum up the two distributions with a variable weighting so the lognormal dominates in the leftern and the pareto in the rightern part of the compound distr. The weighting should be another function (e.g. the normal CDF) Sadly my first tries with such a mixing criterion didnt work. I found that with such a mixing the result is not a density function because: * the CDF is not monotonic increasing if I use the CDF * the mass under the curve is <> 1 if I use the density functions So ... what now? Does anybody know a solution for the setting above? === Subject: Re: mixing distributions > [...] > * the mass under the curve is <> 1 if I use the density functions So ... what now? Does anybody know a solution for the setting above? Why don't you just normalize it? === Subject: Re: mixing distributions On 21-Jul-2005, Carsten Steinhoff > I have a dataset and want to fit a distribution on it. I found that in the left area e.g. a lognormal distribution fits very well and in the right > area > the pareto distr fits very well. First I tried to put them together via > splicing. That means, the compound distr is a defined as lognormal below x=u and as pareto else. > But the problem with this approach is that I have to chose a single u, > whats > sometimes quiet difficult. > So I think of a modification ... why setting u as fixum instead of taking > a > mixing of the both functions? I would like to take a look at your problem for you. There are several possibilities. You might make 'u' a parameter in a nonlinear model and let the modeling algorithm determine the optimal value of the splice point. I have had success with this approach on piecewise linear problems (for example, see http://www.nlreg.com/piece.htm). > The Idea is: I sum up the two distributions with a variable weighting so > the > lognormal dominates in the leftern and the pareto in the rightern part of > the compound distr. The weighting should be another function (e.g. the > normal CDF) > Sadly my first tries with such a mixing criterion didn't work. I found > that with such a mixing the result is not a density function because: * the CDF is not monotonic increasing if I use the CDF > * the mass under the curve is <> 1 if I use the density functions Your idea of weighting is interesting, but I don't know if it will work. Can you send me your data file and the two functions that you are trying to fit on each side of the splice point? I want to see if I can automatically determine the optimal splice point. -- Phil Sherrod (phil.sherrod 'at' sandh.com) http://www.dtreg.com (decision tree modeling) http://www.nlreg.com (nonlinear regression) http://www.NewsRover.com (Usenet newsreader) http://www.LogRover.com (Web statistics analysis) === Subject: easy and fast way to make a lot of money... firs of all sup all? you have no idea how lucky you are for bump into this massage, so be for you close its, satisfied 5 min of curiosity ( like I did) and believe me, most of you wont regret .83 it worth that. Already as a beginning if you read this from a forum, you should pass what writing to the notepad or to the word and save, that you could read it carefully (in cash of the forumsÍ managers decide to delete the massage. And to bed, cause if so it them lost.) Just read it, crazy how genius it is. My first thought was that it is a fraud, I said to myself, ñyea right..î but as most of us I was curious and I keep reading, Was writing there that if I sand 1$ to each of the 6 address, that was written below, I could make lot of money in little time. Usually I ignore from this kind of letters, but the love and the attention that cause me this later (and the big consequences), show me that this one different, and this why I decided to take part in this. If this later continued as he suppose to, if we will put our suspects aside, surly, every one of us will make a profit. How absurd it to think that we been cheating us, how much energy we waste on the doubt?! Instead of taking this energy and spend it at the opportunity that been given us. The question I asked myself before I agreed to take part in this thing that changed my life, does it true? Yes it is! ItÍs true and itÍs work! The person who was above me (in list) telling: ñwithin 7 days I started get money in mail. I was shocked! I thought it will be finish soon and I didnÍt thought about it too much. But the money keeps coming! In the first week I get 25$ in the end of the second week 1000$, in the end of the third week I had more then 10000$!!! And it still grow! Now this the fourth week, I got sum of more then 42000$ and it keep coming!!! It currently was worth the 6$ + 6 stamps!!! For your intention! Follow after the simple instruction (that will be explain down) and you will see how the money coming!!! It easy, it legal and your invest it jest 6$ + 6 stamps!!! (lets say that 1$ for week + one stamp- just show you how much the invest close to nothing)! If all the next instructions will be done in attention you will achieve a big profit. This plan stay successful for the honesty and cooperation of people which read it. Please, keep the plane successful and help each one of us to help each other. Here the four steps to success: ! Step 1: Take 6 different piece of papers, and write the flowing sentence on each piece of paper: ñplease put me in your listî, write your names and the exact address on it. Now, you need to have 6 close envelope, each one have note with the above mentioned sentence, your name and address and 1$ in each of them. What you going to do is to create serves. You ask legitimate serves which is to be added to the list and you pay for it. 1. Gal Dor- P.O. box: 8216 polg Natanya industry area, Israel 2. Efrat Yakir - sîa 53 Tel Aviv, Israel 3. Shai Mida- brinshtein 3/3 Holon, Israel 4. Zevi Zesler- hadekel 2/2 Carmiel 21892, Israel 5. Naor Barouch- avenuesÍ Rotshild 27/7 Ashdod, Israel 6. Liran Rosenbaum- Ben Eliezer 8/16 Ashdod, Israel Those are the 6 address that you need to send the envelope to [CapitalEth] one each! Step 2: Delete the first name from the list ( number 1), move all the other names one up ( that who was number 6 becoming 5 and 5 becoming 4.83) and add your name and full address as number 6 in list. Step 3: Step 4: Also send all your friend this fix letter to their e-mail. Mark the title of the subject (this how all will see when they get in to specific group). Click on send message and you finished with the first group!!! Please remember! This plan stay successful because the honesty and the integration of the persons taking part, and by careful and intention of following instruction. Look like this: if you people of integration this plan will continue, and the money that so much people get will come to you too. So all letter get attention, and is instruction be done carefully- 6 people will get money (1$) each, for you to take part in this. Your name will move up in the list in geometric way, that until your name coming to the number 1 place, you already get thousands of dollars!!! That it, congratulations! All you need to do, it to pass from one group to other and send again. When you will get used to this it will take you like 30 seconds! Remember! As much as you send the message more you get. But you need to send minimum 300 messages. That it! Start getting cash from all over the word in days! Remember, when you adversities in out of country forums you need to translate the letter to the selected language. Now we will discuss the question why to take part? Now 343 people will send minimum 300 messages with my name as number 3 and each one will get just 7 responses, I will make 2410$ !!! o.k., now the fun part, each one from the 2401 people send minimum 300 letters with my name as number 2 and each one of them get just 7 answers. This will give me 16, 807$. Now each one from the 16,807 people will send this message to 300 groups with my name as number 1 and if still 7 will answers from all the groups I will get 117,649$ with a basically spend of 6$ and 6 stamps!!!!!!!! Remember ñhonesty it the best wayî, you donÍt need to cheat. Be fear and you will get the huge profit which is ña lot of moneyî. So if all will get just 7 answers as the above mentioned description, you will get some of 117,649$ !!! would you be ready to miss this kind of opportunity for ñriskî of 6$ + 6 stamps ?! I didnÍt, and I hope you will join me that we will help each other. Notes: - maybe you will want to hire mailbox because the amount of mail that you will get. If you prefer to stay anonymous, you can use invented name. - If there is person in the list that you already known still send him the 1$, they part of this genius idea too! Would you prepare to take responsible and not to miss that simple wonderful business possible, for ñriskî of 6$ + 6 stamps ?? I hope that you will join me that we will be possible each other! - could be that you already saw this massage before because this business works! And the most important.83! If you try to cheat people by send the massages with your name in the list, without send the money to the 6 people that already was in the list [CapitalEth] you almost donÍt get a thing! Also donÍt try to change the other names. Already it a easy money and think what would happen if every one would cheat.83 exactly! Non of that would happen and you wouldnÍt have a thing!! So lets go no one try to be clever, going according the rules and the money in the way to you!!!! Good luck!!!! === Subject: SPSS - ANOVA question Hello. If anyone could help me out and offer any insight, I would be totally grateful! A repeated measures T-test for each group showed one group is signficant and one group is NOT significant. So why would my mixed ANOVA test show NO Group signficance (main effect) and NO Time*Group (interaction effect) signficance? More details: I ran a mixed ANOVA with: Between-groups variable = Group (2 levels) Within-groups variable = Time (2 levels) Time (main effect) is significant Group (main effect) is NOT significant Time*Group (interaction effect) is NOT significant. HOWEVER: 1-way repeated measures ANOVA for Group A, is significant. Paired Samples T-test for Group A is signficant. 1-way repeated measures ANOVA for Group B is NOT significant. Paired Samples T-test for group B is NOT significant. If the 1-way repeated measures ANOVA is significant for Group A but NOT Group B, then why for the original ANOVA is Group (main effect) NOT signficiant and Time*Group (interaction effect) is NOT significant? What are some possible explanations? Time 1 / Group A: Mean = 5.9, N = 18 Time 1 / Group B: Mean = 7.3, N = 19 Time 1 / Total: Mean = 6.6, N = 37 Time 2 / Group A: Mean = 5.0, N = 18 Time 2 / Group B: Mean = 4.8, N = 19 Time 2 / Total: Mean = 4.9, N = 37 === Subject: Re: SPSS - ANOVA question [ ... ] A repeated measures T-test for each group showed one group is signficant and one group is NOT significant. So why would my mixed ANOVA test show NO Group signficance (main effect) and NO Time*Group (interaction effect) signficance? This is not particularly unusual. Let's say -- 1) A shows improvement that is greater than a fixed 0, but only barely. 2) B shows 0 improvement. Then 1) The overall improvement averages only half the improvement in A, so it does not test as different from 0. 2) The interaction tests the A-improvement versus the B-improvement of zero. However, the B_impr=0 is not a fixed number, but has error attached. Thus, testing A versus B_impr is not as powerful a test as testing A versus 0, and the interaction is not significant. The variance of the difference-in-improvements is the sum of the variance of the two improvements. If A's t-test is barely significant, the test on B will have to be the opposite sign, to have a chance for the interaction to be significant. [snip, explanation] Time 1 / Group A: Mean = 5.9, N = 18 > Time 1 / Group B: Mean = 7.3, N = 19 > Time 1 / Total: Mean = 6.6, N = 37 Time 2 / Group A: Mean = 5.0, N = 18 > Time 2 / Group B: Mean = 4.8, N = 19 > Time 2 / Total: Mean = 4.9, N = 37 > What difference exists between groups is mostly at Time 1, so the groups were not matched at the start. That alone makes it difficult to draw inferences from the results. -- Rich Ulrich, wpilib@pitt.edu http://www.pitt.edu/~wpilib/index.html === Subject: When does this equation make sense? Hi all, I learned this random sum formula from Ross' book. E(S)=E(summation of X_i where i from 1 to N, where N is another random variable)=E(X_i)*E(N) Could you please elaborate general conditions on when does this equation hold? Simple and complicated conditions all are welcome. === Subject: Re: When does this equation make sense? >E(S)=E(summation of X_i where i from 1 to N, where N is another random >variable)=E(X_i)*E(N) Could you please elaborate general conditions on when does this equation >hold? Simple and complicated conditions all are welcome. > If X1, X2, X3,... are independent random variables with well-defined common mean m and N is a random variable which is independent of the process X and almost surely a natural number, then E sum(i=1..N, X_i) = m EN, where we interpret 0 * infty as 0. Let X1, X2, X3,... be a sequence of random variables with common well-defined mean m. Let N be a stopping time for the process X with finite expectation. If all the X_i are all almost surely nonnegative or m is finite, then E sum(i=1..N, X_i) = m EN. (This is a generalization of Wald's equation.) -- === Subject: Re: When does this equation make sense? >> If X1, X2, X3,... are independent random variables with >> well-defined common mean m and N is a random variable which is >> independent of the process X and almost surely a natural number, >> then E sum(i=1..N, X_i) = m EN, where we interpret 0 * infty as 0. > Actually, we can drop the condition that the X_i are independent. -- === Subject: Re: When does this equation make sense? >I learned this random sum formula from Ross' book. >E(S)=E(summation of X_i where i from 1 to N, where N is another random >variable)=E(X_i)*E(N) >Could you please elaborate general conditions on when does this equation >hold? Simple and complicated conditions all are welcome. For this to make any sense, the values of N are in the positive integers, the X_i are iid and also independent of N, and E[N] and E[X_i] exist. That should be sufficient: consider sum_{i=1}^{min(N,m)} X_i for constant m, and use the Monotone Convergence Theorem for the case X_i > 0, and then the Dominated Convergence Theorem for the general case. Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada === Subject: Re: When does this equation make sense? >>I learned this random sum formula from Ross' book. >E(S)=E(summation of X_i where i from 1 to N, where N is another random >>variable)=E(X_i)*E(N) >Could you please elaborate general conditions on when does this equation >>hold? Simple and complicated conditions all are welcome. >For this to make any sense, the values of N are in the positive integers, >the X_i are iid and also independent of N, and E[N] and E[X_i] exist. >That should be sufficient: consider sum_{i=1}^{min(N,m)} X_i for >constant m, and use the Monotone Convergence Theorem for >the case X_i > 0, and then the Dominated Convergence Theorem for the >general case. I think it can be proved by more elementary methods, by noting that if m=E(X_i), then E(S) = E(E(S|N)) = E(mN) = mE(N) ---------------------------------------------------------------------------- Radford M. Neal radford@cs.utoronto.ca Dept. of Statistics and Dept. of Computer Science radford@utstat.utoronto.ca University of Toronto http://www.cs.utoronto.ca/~radford ---------------------------------------------------------------------------- === Subject: Re: When does this equation make sense? > I learned this random sum formula from Ross' book. E(S)=E(summation of X_i where i from 1 to N, where N is another random > variable)=E(X_i)*E(N) Could you please elaborate general conditions on when does this equation > hold? As written, it makes no sense. For which i do you evaluate E(X_i) in the last piece? Whatever it is that you actually meant to write, doesn't Ross say something about the conditions under which it holds? Usually, people who write books include hypotheses with their theorems. -- === Subject: what is the use of the p-value in hypothesis testing... I am reading John Rice's book on statistics: chapter 9 Hypothesis testing. He mentioned about p-value here and there but I really don't know a. What is p-value? b. How to compute p-value? c. What are the significance of p-value? What are the uses of p-value? Can anybody enlighten me? === Subject: Re: what is the use of the p-value in hypothesis testing... In brief: > I am reading John Rice's book on statistics: chapter 9 Hypothesis testing. He mentioned about p-value here and there but I really don't know a. What is p-value? This is the probability that a test statistic is at least as extreme as the value you got from your data, assuming you have the proper distribution model. > b. How to compute p-value? This depends on the distribution, but usually it is done through numeric integration or by table lookup (which is basically using other's numeric integrations) Some models (such as a discrete distribution) can be done explicitly, rather than by approximation > c. What are the significance of p-value? What are the uses of p-value? If the p value is small, it indicates that either you got a rare event, or at least one of your assumptions is incorrect (the distribution is a different model, or your null-hypothesis is wrong. === Subject: Re: what is the use of the p-value in hypothesis testing... > I am reading John Rice's book on statistics: chapter 9 Hypothesis testing. He mentioned about p-value here and there but I really don't know a. What is p-value? > b. How to compute p-value? > c. What are the significance of p-value? What are the uses of p-value? Can anybody enlighten me? http://www.tufts.edu/~gdallal/pval.htm === Subject: Re: what is the use of the p-value in hypothesis testing... b. How to compute p-value? > c. What are the significance of p-value? What are the uses of p-value? Can anybody enlighten me? > http://www.tufts.edu/~gdallal/pval.htm Jerry, I've been flamed more times for verbosity and rant for my careful explanation of statistical concepts and terms. I only had a minute to peruse a SMALL part of what's in your link which puts MY verbosity and rant to shame. :-) I think you could have said, in YOUR one sentence, for question (a): JD> A P value is often described as the probability of seeing JD> results as or more extreme as those actually observed if JD> the null hypothesis were true. I'll have to wait till tonight in the Hyatt Regency Hotlanta to read the rest to see what nits I can find. :-) Seriously, the part I read looked like a well thought out exposition, especially for an average audience of the sci.stat.* (non-statisticians or someone who had taken a first or second course in statistics and had forgotten most of it. ) Here's a very TINY nit ... JD> If your personal fixed level is greater than or equal to the JD> P value, you would reject the null hypothesis. This is true ONLY if the Alternative Hypothesis is one-sided (>) You later use of more extreme would take care of both one-sided and two-sided alternatives. -- Bob. === Subject: Re: what is the use of the p-value in hypothesis testing... >I am reading John Rice's book on statistics: chapter 9 Hypothesis testing. He mentioned about p-value here and there but I really don't know a. What is p-value? >b. How to compute p-value? >c. What are the significance of p-value? What are the uses of p-value? Can anybody enlighten me? >>http://www.tufts.edu/~gdallal/pval.htm > Jerry, I've been flamed more times for verbosity and rant for > my careful explanation of statistical concepts and terms. I only had a minute to peruse a SMALL part of what's in your link > which puts MY verbosity and rant to shame. :-) I think you > could have said, in YOUR one sentence, for question (a): JD> A P value is often described as the probability of seeing > JD> results as or more extreme as those actually observed if > JD> the null hypothesis were true. > Which puts you in Jeffreys in Wonderland: What the use of P implies, therefore, is that a hypothesis that may be true may be rejected because it has not predicted observable results that have not occurred. (Theory of Probability, 3rd ed, p 385). What scared me last year was realizing at the end of the semester that very few of the students in my intro course would have responded, A P value is probability of seeing results as or more extreme as those actually observed if the null hypothesis were true. But most of them would rattle off as though learned by rote (maybe because they had?) that the P value is the smallest fixed level for which the null hypothesis can be rejected. I'll try to strike a better balance this year. === Subject: Re: what is the use of the p-value in hypothesis testing... >> I am reading John Rice's book on statistics: chapter 9 Hypothesis >> testing. >> He mentioned about p-value here and there but I really don't know >> a. What is p-value? >> b. How to compute p-value? >> c. What are the significance of p-value? What are the uses of p-value? >> Can anybody enlighten me? http://www.tufts.edu/~gdallal/pval.htm >> Jerry, I've been flamed more times for verbosity and rant for >> my careful explanation of statistical concepts and terms. >> I only had a minute to peruse a SMALL part of what's in your link >> which puts MY verbosity and rant to shame. :-) I think you >> could have said, in YOUR one sentence, for question (a): >> JD> A P value is often described as the probability of seeing >> JD> results as or more extreme as those actually observed if >> JD> the null hypothesis were true. >> At the risk of droning on, after a few moments' reflection, I believe this is an answer to (b), not (a). Telling how to compute something is different from saying what it is. What a P value *is* is the smallest fixed level for which the null hypothesis can be rejected. If it weren't that, then we wouldn't care that it can be calculated as the probability of results as or more extreme as those actually observed if the null hypothesis were true. === Subject: Re: what is the use of the p-value in hypothesis testing... >> I am reading John Rice's book on statistics: chapter 9 Hypothesis >> testing. >> He mentioned about p-value here and there but I really don't know >> a. What is p-value? >> b. How to compute p-value? >> c. What are the significance of p-value? What are the uses of p-value? >> Can anybody enlighten me? http://www.tufts.edu/~gdallal/pval.htm >> Jerry, I've been flamed more times for verbosity and rant for >> my careful explanation of statistical concepts and terms. >> I only had a minute to peruse a SMALL part of what's in your link >> which puts MY verbosity and rant to shame. :-) I think you >> could have said, in YOUR one sentence, for question (a): >> JD> A P value is often described as the probability of seeing >> JD> results as or more extreme as those actually observed if >> JD> the null hypothesis were true. At the risk of droning on, after a few moments' reflection, I believe > this is an answer to (b), not (a). Huh? I still haven't had time to read the rest of your web link, but I don't think I need to given your two posts! The p-value depends ENTIRELY on the OBSERVED value of the test statistic AND the ALTERNATIVE hypothesis (or the direction(s) of the REJECTION region)!! Your more extreme answer is correct for BOTH (a) and (b). Your greater than answer was WRONG if the Alternative Hypothesis is either < one sided in the opposite direction from the observed; or not equal to (two sided). See e.g., http://tinyurl.com/8hrw8 In particular, if your Alternative hypothesis is p > po, and your OBSERVED test statistic Z is -1.96, then your p-value is 0.975! p-value would be 0.025; and if the Alternative is p .ne. po, then the p-value would be 0.05. -- Bob. === Subject: Re: what is the use of the p-value in hypothesis testing... > I don't understand your point. Maybe I missing something. More likely we're using the same words differently. > The p-value depends ENTIRELY on the OBSERVED value of the test > statistic > AND the ALTERNATIVE hypothesis (or the direction(s) of the REJECTION > region)!! correct. > Your more extreme answer is correct for BOTH (a) and (b). Your > greater than answer was WRONG if the Alternative Hypothesis is > either < one sided in the opposite direction from the observed; > or not equal to (two sided). I'm not sure what you're referring to. The main (only?) place I use greater than is in If your personal fixed level is greater than or equal to the P value, you would reject the null hypothesis. > In particular, if your Alternative hypothesis is p > po, and your > OBSERVED test statistic Z is -1.96, then your p-value is 0.975! H0: p<=p0 H1: p>p0 z=-1.9, P=0.975, so you can reject H0 in favor of H1 iff your personal fixed level is >=0.975. > p-value would be 0.025; you can reject H0: p>=p0 in favor of H1: p=0.025 and if the Alternative is p .ne. po, > then the p-value would be 0.05. you can reject H0: p=p0 in favor of H1: p^=p0 iif your personal fixed level is >=0.05. How were you interpreting what I said? --Jerry > -- Bob. > === Subject: Re: what is the use of the p-value in hypothesis testing... we're using the same words differently. > RF > The p-value depends ENTIRELY on the OBSERVED value of the test RF > statistic AND the ALTERNATIVE hypothesis (or the direction(s) of RF > the REJECTION region)!! correct. > Your more extreme answer is correct for BOTH (a) and (b). Your > greater than answer was WRONG if the Alternative Hypothesis is > either < one sided in the opposite direction from the observed; > or not equal to (two sided). > I'm not sure what you're referring to. p-value is the probability that the text statistic lies in the DIRECTIONS(s) of the rejection region, given the observed value. The main (only?) place I use > greater than is in If your personal fixed level is greater than or > equal to the P value, you would reject the null hypothesis. You personal fixed level has NOTHING to do with the DEFINITION of the p=value. THAT's the point. > RF> In particular, if your Alternative hypothesis is p > po, and your RF> OBSERVED test statistic Z is -1.96, then your p-value is 0.975! H0: p<=p0 Actually p = po is the sharp null will do. > H1: p>p0 z=-1.9, P=0.975, so you can reject H0 in favor of H1 iff your personal > fixed level is >=0.975. Apart from your typo of -1.9 for -1.96, the p-value of 0.975 simply means if Ho is TRUE, the probability that you observe something more extreme than -1.96 (given the Alternative) is 0.975. Again, it has NOTHING to do with your personal fixed level. To emphasize that point, suppose somebody says he doesn't want to tell you what his personal fixed level is, given the Ho and H1, it doesn't matter!! The p-values are uniquely defined once the test statistic is observed. In short, the fact that you used ONLY greater than in your web example, and your brought in the IRRELEVANCE of the Jeffrey stuff which is NOT Frequentistic, and that you failed to mention the critical relevance of the ALTERNATIVE, which could make the rejection region TWO SIDED, no matter whether you observed it on the right or on the left -- those are the points that I believe are not clearly delinearated in your exposition in the web link. < Snip other two analogous cases on different alternative How were you interpreting what I said? See my preceding paragraphs. === Subject: Re: what is the use of the p-value in hypothesis testing... >Your more extreme answer is correct for BOTH (a) and (b). Your >greater than answer was WRONG if the Alternative Hypothesis is >either < one sided in the opposite direction from the observed; >or not equal to (two sided). >>I'm not sure what you're referring to. > p-value is the probability that the text statistic lies in the > DIRECTIONS(s) of the rejection region, given the observed value. Of course. That's why my discussion starts with fixed levels and critical regions. Once you admit the existence of a CR (determined by H0, H1, and the size of the test) the point you're making is already implied. The main (only?) place I use >greater than is in If your personal fixed level is greater than or >>equal to the P value, you would reject the null hypothesis. > You personal fixed level has NOTHING to do with the DEFINITION of > the p=value. THAT's the point. I disagree. Personally, I find the phrase P value to be an abomination, like when people talk about their n instead of sample size. When I was trained--and I hope it is still the case--statisticians talked about the observed significance level, the smallest fixed level for which the null hypothesis could be rejected. it was introduce to get away from the silly star system (*=0.05, **=0.01, etc.). So fixed levels have EVERYTHING to do with the DEFINITION of the P value, that is, the OBSERVED significance level. However, Stephen Stigler I'm not. I admit I don't know the entire history of the observed significance level. So, I'm happy to be pointed to the relevant references. The whole thing gets dicey because of Fisher's fiducial probability, but insofar as P values--I mean observed significance levels--are a replacement for the star system, I stand by my comment until I see references to the contrary. > To emphasize that point, suppose somebody says he doesn't want to > tell you what his personal fixed level is, given the Ho and > H1, it doesn't matter!! The p-values are uniquely defined once > the test statistic is observed. Correct. I don't need to know your personal fixed level to come up with the P value. All I say is, Yo, Bob! If your fixed level is 0.0374 or greater, you can reject H0. Otherwise, no. > In short, the fact that you used ONLY greater than in your web > example, and your brought in the IRRELEVANCE of the Jeffrey stuff > which is NOT Frequentistic, and that you failed to mention the > critical relevance of the ALTERNATIVE, which could make the > rejection region TWO SIDED, no matter whether you observed it > on the right or on the left -- those are the points that I > believe are not clearly delinearated in your exposition in the > web link. However, Jeffreys is not irrelevant. If the P value is not an observed significance level, why compute the darn thing? What is boils down to is whether the P value was introduced as another term for the observed significance level, in which case I stand by my remarks, or whether observed significance level was introduced as another term for P value, in which case I would agree with your version. Does anyone have a reference at hand? It appears that P value may have been introduced by Deming on page 30 of his Statistical Adjustment of Data, which I don't own. === Subject: Re: what is the use of the p-value in hypothesis testing... greater than answer was WRONG if the Alternative Hypothesis is >either < one sided in the opposite direction from the observed; >or not equal to (two sided). >>I'm not sure what you're referring to. You personal fixed level has NOTHING to do with the DEFINITION of > the p=value. THAT's the point. I disagree. Personally, I find the phrase P value to be an > abomination, Be that as it may, but your disagreement did NOT refute that the DEFINITION of the p-value has nothing to do with YOUR personal fixed level. The p-value is well-defined in Frequentist statistic. It does not depend on and it doesn't care what YOUR personal fixed alpha is. > like when people talk about their n instead of sample > size. When I was trained--and I hope it is still the > case--statisticians talked about the observed significance level, the > smallest fixed level for which the null hypothesis could be rejected. > it was introduce to get away from the silly star system (*=0.05, > **=0.01, etc.). So fixed levels have EVERYTHING to do with the > DEFINITION of the P value, that is, the OBSERVED significance level. > However, Stephen Stigler I'm not. I admit I don't know the entire > history of the observed significance level. So, I'm happy to be pointed > to the relevant references. The whole thing gets dicey because of Fisher's fiducial probability, but > insofar as P values--I mean observed significance levels--are a > replacement for the star system, I stand by my comment until I see > references to the contrary. Cans of red-herrings above. The way to untangle yourself from the irrelevant Fisher, Jeffreys, sample size, star, significance level red-herrings is to START with, and STICK TO the DEFINITION of a p-value, and forget about your or anyone else's fixed alpha level! In retrospect, I should have made my statement THIS way: The DEFINITION of p-value does NOT depend on your fixed level, and it has NOTHING to do with YOUR fixed level. In symbolic form in LOGIC, that says A does NOT depend on B, where A = definition of p-balue and B = YOUR (or anyone else's) personal fixed level. which is completely unambiguous, whereas what I actually said was somewhat ambiguous, though it meant the same! > You personal fixed level has NOTHING to do with the DEFINITION of > the p=value. THAT's the point. B does NOT depend on A either. But your INTERPRETATION of your B certainly depends on A, though the level you chose for B doesn't!! Say, have you gotten Copi's book on Introduction to Logic yet? :-) While your INTERPRETATION of your fixed levels have EVERYTHING to do with the DEFINITION of the p-value (correct) it does not contradict or support the fact that The DEFINITION of p-value does NOT depend on your fixed level, and it has NOTHING to do with YOUR fixed level. That's why I had explained it the way below to you, and you agreed. > To emphasize that point, suppose somebody says he doesn't want to > tell you what his personal fixed level is, given the Ho and > H1, it doesn't matter!! The p-values are uniquely defined once > the test statistic is observed. Correct. I don't need to know your personal fixed level to come up with > the P value. That's the END OF STORY on the DEFINITION of a p-value. > All I say is, Yo, Bob! If your fixed level is 0.0374 or > greater, you can reject H0. Otherwise, no. And I say, Yo, Jerry! Whatever my fixed level is none of yo bidness, and IRRELEVANT to the definition of the p-value we had agreed upon! > In short, the fact that you used ONLY greater than in your web > example, and your brought in the IRRELEVANCE of the Jeffrey stuff > which is NOT Frequentistic, and that you failed to mention the > critical relevance of the ALTERNATIVE, which could make the > rejection region TWO SIDED, no matter whether you observed it > on the right or on the left -- those are the points that I > believe are not clearly delinearated in your exposition in the > web link. However, Jeffreys is not irrelevant. Yes, it is -- relative to the DEFINITION of p-value. > If the P value is not an observed > significance level, why compute the darn thing? So that we can ALL use it for our Frequentist hypothesis testing conclusion, no matter WHAT our personal fixed level of alpha is. > What is boils down to > is whether the P value was introduced as another term for the > observed significance level, in which case I stand by my remarks, or > whether observed significance level was introduced as another term for > P value, in which case I would agree with your version. The etymology of the term p-value is not the issue, nor is it really relevant. Once the DEFINITION is agreed upon by all (including you, except for your unwarranted red-herrings), it's all that matters. You know how to compute it (I think), I know how to compute it, but I don't think everyone knows that a p-value can be greater than 0.5. You know to to use it, I know how to use it, and almost everyone knows how to used it (else there wouldn't have been this thread), and that's all there is to it -- the DEFINITION of the p-value associated with a hypothesis test -- no matter WHAT your personal alpha level is. Does anyone have a reference at hand? It appears that P value may have > been introduced by Deming on page 30 of his Statistical Adjustment of > Data, which I don't own. Again, you seem to be looking for the historical etymology of the term p-value, rather than just pick up a current textbook, ANY textbook, and see how the p-value is DEFINED! I have not seen it any other way than the more extreme way, nor the definition depending on anyone's personal alpha. Try it this way, Jerry. My alpha is 0.012, what's the p-value? Your alpha is 0.05, what's the p-value? Joe's alpha is 0.01, what't the p-value? If you can come up with ANY reference that says the p-value(s) above are DIFFERENT, then you have a point. Given that it's IMPOSSIBLE for the above p-value to be different, I have proved MY point that: The DEFINITION of p-value does NOT depend on your fixed level, and it has NOTHING to do with YOUR fixed level. -- Bob. === Subject: Re: what is the use of the p-value in hypothesis testing... > The DEFINITION of p-value does NOT depend on your fixed level, and > it has NOTHING to do with YOUR fixed level. If the point is about the word YOUR, then you may be reading more into it than I intend. I don't have my library at home but I do have a spare copy of Bernie Rosner's book here (5-th ed). His definition 7.13 (p 217) reads, The p-value for any hypothesis test is the level at which we would be indifferent between accepting or rejecting H0 given the sample data at hand. That is, the p-value is the level at which the given value of the test statistic (such as t) would be on the borderline between the acceptance and rejection regions. The only reason I talk about your fixed level is to make it more concrete for the reader. The tone of my notes is meant to make them more conversational than a text book. Just substitute the for your. If your personal fixed level is greater than or equal to the P value, you would reject the null hypothesis. If your personal fixed level is less than to [sic] the P value, you would fail to reject the null hypothesis. becomes If the fixed level is greater than or equal to the P value, the null hypothesis would be rejected. If the fixed level is less than the P value, we would fail to reject the null hypothesis. === Subject: Help! Difficulty in understanding order-statistics vs. quantile plot... I am trying to understand how to skectch the empirical distribution quantile vs. theoratical distribution quantile ... In the following webpage, the theoratic distribution is normal distribution. The data ordered statistics is double exponential, which was plot against it. http://www.itl.nist.gov/div898/handbook/eda/section3/normprp3.htm I don't understand this sentence: The double exponential distribution is symmetric, but relative to the normal it declines rapidly and has longer tails. I think it is of the order exp(-x), compared to exp(-x^2), relative to the normal it should decline slowly and has fatter tails... am I right? I don't understand why the plot is S-like... I also don't understand the sentences For long tails, the first few points show increasing departure from the fitted line below the line and last few points show increasing departure from the fitted line above the line. -----------------------Quotes from the webpage------------------ First, the middle of the data may show an S-like pattern. This is common for both short and long tails. In this particular case, the S pattern in the middle is fairly mild. Second, the first few and the last few points show marked departure from the reference fitted line. In the plot above, this is most noticeable for the first few data points. In comparing this plot to the short-tail example in the previous section, the important difference is the direction of the departure from the fitted line for the first few and the last few points. For long tails, the first few points show increasing departure from the fitted line below the line and last few points show increasing departure from the fitted line above the line. For short tails, this pattern is reversed. === Subject: Re: Help! Difficulty in understanding order-statistics vs. quantile plot... >I am trying to understand how to skectch the empirical distribution >quantile vs. theoratical distribution quantile ... In the following webpage, the theoratic distribution is normal > distribution. The data ordered statistics is double exponential, which > was plot against it. http://www.itl.nist.gov/div898/handbook/eda/section3/normprp3.htm I don't understand this sentence: The double exponential distribution is > symmetric, but relative to the normal it declines rapidly and has longer > tails. I think it is of the order exp(-x), compared to exp(-x^2), relative to the > normal it should decline slowly and has fatter tails... am I right? > No. if |x| < 1, x^2 < |x| if |x| > 1 x^2 > |x| === Subject: queueing theory I have to calculate the percentage of the users served within 30 minutes and within 60 minutes on all user served in a morning by a office. The data that I have are: -working hours x day -number of counters -number of users served x day How can I calculate it? Salvatore === Subject: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? Let n be any positive integer. Let x, y be 2 real numbers such that x is not equal to y. Let f(n,x,y) = (x^n - y^n) / (x-y) . Can you come up with a factorized polynomial expression for f(n,x,y) by dividing through? Special cases: f(0,x,y) = 0 f(1,x,y) = 1 f(2,x,y) = x+y f(3,x,y) = x^2 + xy + y^2 f(4,x,y) = (x+y) (x^2 + y^2) ... What is the general expression for f(n,x,y)? K. Onyee === Subject: Re: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? >Let n be any positive integer. >Let x, y be 2 real numbers such that x is not equal to y. >Let > f(n,x,y) = (x^n - y^n) / (x-y) . Can you come up with a factorized polynomial expression for f(n,x,y) by >dividing through? Special cases: >f(0,x,y) = 0 >f(1,x,y) = 1 >f(2,x,y) = x+y >f(3,x,y) = x^2 + xy + y^2 >f(4,x,y) = (x+y) (x^2 + y^2) >... >What is the general expression for f(n,x,y)? > The general (unfactorized) expression is sum{x^(n-1-k)*y^k} with the summation being on k, from 0 to n-1. Factorization is left as an exercise for the reader. Mati Meron | When you argue with a fool, meron@cars.uchicago.edu | chances are he is doing just the same === Subject: Re: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? You seem to be looking at the divided difference for f(z):=z^n. (f(x)-f(y)/(x-y). You can see discussion of how to express this, and how to compute this rapidly, not necessarily by factoring, in this paper http://www.cs.berkeley.edu/~fateman/papers/divdiff.pdf For example, 6 multiplies, 3 adds suffices to compute.. (x^5 - y^5)/(x - y) = x^4 + x^3 y + x^2 y^2 + xy^3 + y^4 = x .87 (x + y) .87 (x^2 + y^2 ) + (y^2 )^2. You might restrict your future questions to fewer newsgroups. RJF >Let n be any positive integer. >>Let x, y be 2 real numbers such that x is not equal to y. >>Let >> f(n,x,y) = (x^n - y^n) / (x-y) . >>Can you come up with a factorized polynomial expression for f(n,x,y) by >>dividing through? >> === Subject: Re: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? > Let n be any positive integer. > Let x, y be 2 real numbers such that x is not equal to y. > Let > f(n,x,y) = (x^n - y^n) / (x-y) . Can you come up with a factorized polynomial expression for f(n,x,y) by > dividing through? Special cases: > f(0,x,y) = 0 > f(1,x,y) = 1 > f(2,x,y) = x+y > f(3,x,y) = x^2 + xy + y^2 > f(4,x,y) = (x+y) (x^2 + y^2) > ... > What is the general expression for f(n,x,y)? K. Onyee > Well, f(n,x,1) is known as the cyclotomic polynomial, and given f(n,x,1) you can easily write f(n,x,y). To completely factor f(n,x,1) with complex coefficients, use the linear factors: f(n,x,1) = product((x - exp(2 Pi i k / n)), k=1..n-1) For example: f(4,x,1) = (x+1)(x+i)(x-i), and thus f(4,x,y) = (x+y)(x+iy)(x-iy) -- http://www.math.ohio-state.edu/~edgar/ === Subject: Re: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? >> Let n be any positive integer. >> Let x, y be 2 real numbers such that x is not equal to y. >> Let >> f(n,x,y) = (x^n - y^n) / (x-y) . >> Can you come up with a factorized polynomial expression for f(n,x,y) by >> dividing through? >> Special cases: >> f(0,x,y) = 0 >> f(1,x,y) = 1 >> f(2,x,y) = x+y >> f(3,x,y) = x^2 + xy + y^2 >> f(4,x,y) = (x+y) (x^2 + y^2) >> ... >> What is the general expression for f(n,x,y)? >> K. Onyee >Well, f(n,x,1) is known as the cyclotomic polynomial, and No. The nth cyclotomic polynomial is the monic polynomial whose roots are the _primitive_ nth roots of unity. It's only f(n,x,1) if n is prime. In general, f(n,x,1) is the product of the kth cyclotomic polynomial of x for all divisors k of n except 1. That's the factorization into polynomials irreducible over the rationals. Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada === Subject: Re: f(n,x,y) = (x^n - y^n) / (x - y) : can you divide it? Let n be any positive integer. > Let x, y be 2 real numbers such that x is not equal to y. > Let > f(n,x,y) = (x^n - y^n) / (x-y) . Can you come up with a factorized polynomial expression for f(n,x,y) by > dividing through? Special cases: > f(0,x,y) = 0 > f(1,x,y) = 1 > f(2,x,y) = x+y > f(3,x,y) = x^2 + xy + y^2 > f(4,x,y) = (x+y) (x^2 + y^2) > ... > What is the general expression for f(n,x,y)? x^(n-1) + x^(n-2).y + x^(n-3).y^2 + ... + x.y^(n-2) + y^(n-1) === Subject: Re: proof derivations of copula results for 2 of Christian Genest's papers Do you have a copy of the Statistical Inference Procedures ... paper? === Subject: cool giant exactly solvable matrix equation! Let i and j be integers (indices) that range from {0,...,H}. Let M be an (H+1)x(H+1) matrix with the following matrix elements: M(i,j) = g_i^j = g_i to the power of j where {g_0, g_1, ..., g_H} are H+1 positive real numbers inside the range (0,R). Let v be an (H+1) vector with matrix elements v(i) = g_i / (R-g_i) Let z be the (H+1) vector determined by solving the matrix equation: M z = v Find the solution for the H+1 matrix elements of z for arbitrary H. (Hint: Using mathematica, I have examined the solutions for H=2, 3, 4, 5. It seems the solutions fall into a simple pattern that should allow one to write down a closed-form solution. Anybody recognize what that would be?) === Subject: Re: cool giant exactly solvable matrix equation! > Let i and j be integers (indices) that range from > {0,...,H}. Let M be an (H+1)x(H+1) matrix with the following > matrix elements: > M(i,j) = g_i^j = g_i to the power of j > where {g_0, g_1, ..., g_H} are H+1 positive real > numbers inside the > range (0,R). Let v be an (H+1) vector with matrix elements > v(i) = g_i / (R-g_i) Let z be the (H+1) vector determined by solving the > matrix equation: > M z = v Find the solution for the H+1 matrix elements of z > for arbitrary H. (Hint: Using mathematica, I have examined the > solutions for H=2, 3, 4, > 5. > It seems the solutions fall into a simple > pattern that should allow one to write down a > closed-form solution. > Anybody recognize what that would be?) > Are the g_i's distinct? Otherwise, M would be singular and there would not be a unique solution. Jack === Subject: Re: cool giant exactly solvable matrix equation! > Let i and j be integers (indices) that range from {0,...,H}. Let M be an (H+1)x(H+1) matrix with the following matrix elements: > M(i,j) = g_i^j = g_i to the power of j > where {g_0, g_1, ..., g_H} are H+1 positive real numbers inside the > range (0,R). Let v be an (H+1) vector with matrix elements > v(i) = g_i / (R-g_i) Let z be the (H+1) vector determined by solving the matrix equation: > M z = v Find the solution for the H+1 matrix elements of z for arbitrary H. (Hint: Using mathematica, I have examined the solutions for H=2, 3, 4, > 5. > It seems the solutions fall into a simple > pattern that should allow one to write down a closed-form solution. > Anybody recognize what that would be?) > the matrix in the first part appears to be a Vandemonde type (qv on the web) which has a known polynomial determinant. Not sure about explicit inverses or the second part. rusty === Subject: Re: cool giant exactly solvable matrix equation! > Let i and j be integers (indices) that range from {0,...,H}. >> Let M be an (H+1)x(H+1) matrix with the following matrix elements: >> M(i,j) = g_i^j = g_i to the power of j >> where {g_0, g_1, ..., g_H} are H+1 positive real numbers inside the >> range (0,R). >> Let v be an (H+1) vector with matrix elements >> v(i) = g_i / (R-g_i) >> Let z be the (H+1) vector determined by solving the matrix equation: >> M z = v >> Find the solution for the H+1 matrix elements of z for arbitrary H. >> (Hint: Using mathematica, I have examined the solutions for H=2, 3, 4, >> 5. >> It seems the solutions fall into a simple >> pattern that should allow one to write down a closed-form solution. >> Anybody recognize what that would be?) >the matrix in the first part appears to be a Vandemonde type (qv on the web) >which has a known polynomial determinant. Not sure about explicit inverses >or the second part. The inversion of a Vandermonde matrix amounts to polynomial interpolation, i.e. Mz = v says that the entries z_i are coefficients of a polynomial P(t) = sum_{j=0}^H z_j t^j such that P(g_i) = v_i for each i. The Lagrange interpolation formula says P(t) = sum_i v_i product_{j <> i} (t-g_j)/(g_i-g_j) Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada === Subject: Re: A variation on Friedman's test on ranks, or just ANOVA? >I guess you could say that the products are rated rather than ranked. >There is a technique called ordinal regression which would be >appropriate here (its also known as proportional odds logistic >regression). See McCullagh & Nelder (1989) Generalized Linear Models >Chapter 5 or Agresti (1990) Categorical Data Analysis, Chapter 8, or a >simular text, for more details. Bob, I did reply a few days ago, I don't know why it hasn't appeared (on my news server anyway). Hope this one does better. I had a look into ordinal regression. I can see that it would be appropriate if I was trying to predict product rating on the basis of factors - but I'm not. I should have been more specific about what I want from the analysis and why I mentioned Friedman :-( Given a confidence level, Friedman tests whether or not all products are the same, and calculates a least significant difference in the rank sums, so that any pairs of products that are significantly different can be identified. I want to do the equivalent thing with the rated data: decide whether or not any products are rated significantly different, then calculate a least significant difference so I can identify which ones they are, and examine physical measurements on those specific products. === Subject: Combining traffic counts I would appreciate it if someone could help me here. I have traffic counts from a number of roadside locations. At some locations I have four separate counts in the same year whilst at others I have only one count every three years. If I had just four counts at each location I think I should do a weighted combination with lower weight given to sites with higher variances. The inclusion of these occasional sites complicates things a bit. Less weight to older tri-annual counts? === Subject: Re: Combining traffic counts > I would appreciate it if someone could help me here. I have traffic counts > from a number of roadside locations. At some locations I have four separate > counts in the same year whilst at others I have only one count every three > years. If I had just four counts at each location I think I should do a > weighted combination with lower weight given to sites with higher variances. > The inclusion of these occasional sites complicates things a bit. Less > weight to older tri-annual counts? Giving reduced weight to higher-variance sites may introduce a bias if the variance is related to the mean, as it would be if the counts are Poisson-distributed. Look at the mean-variance scatter plot first. === Subject: A problem for complete beginners Ann holds a well shuffled ordinary 52 cards pack. She draws the upper card and put it in the packÇs back after notice its value and deck successively 3 times. What is the probability to have two black cards? Who answer? ___________licas_@hotmail.com