Wikipedia:Reference desk/Archives/Mathematics/2008 September 1

= September 1 =

Distance along sine curve
Is there any way to find the distance between two given points on a sine or cosine curve (or any continuous segment of a trigonometric curve, for that matter) along the length of the curve (much like evaluating the length of an arc of a circle)? On a similar note, how can the length of a segment of a conic section curve, e.g. a parabola or an ellipse be evaluated?Leif edling (talk) 06:14, 1 September 2008 (UTC)
 * Our article on arc length covers this fairly well, I think. Briefly, the usual way is to consider the integral
 * $$\int_\gamma \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} dt$$


 * where t is a parameter along the curve. Along a sine curve, we could use x as the independent variable and :$$y=\sin(x)$$ as the dependent variable for
 * $$\int_{x_0}^{x_1} \sqrt{1 + \cos^2(x)}\, dx$$


 * Best, RayAYang (talk) 06:23, 1 September 2008 (UTC)

Perfect square trinomial
What is the value of "c" so, x² + x + c, is a perfect square trinomial? Wikiuser146 (talk) 18:25, 1 September 2008 (UTC)
 * See completing the square. Algebraist 18:29, 1 September 2008 (UTC)
 * Is the answer possible? Wikiuser146 (talk) 18:34, 1 September 2008 (UTC)
 * Yes. Algebraist 18:35, 1 September 2008 (UTC)
 * Is the answer "1"? —Wikiuser146 (talk • contribs) 18:38, 1 September 2008 (UTC)
 * No, (x + 1)² = x² + 2x + 1 ≠ x² + x + 1 --El aprendelenguas (talk) 18:48, 1 September 2008 (UTC)
 * Ignore the "c" and use the other two terms to determine the binomial. Then expand the binomial and determine c.  --Bowlhover (talk) 23:44, 1 September 2008 (UTC)
 * Or just find the value of c for which the discriminant is zero. siℓℓy rabbit  (  talk  ) 00:00, 2 September 2008 (UTC)

10 marbles
Consider a paper bag full of 10 marbles, 9 red and 1 blue. Suppose 10 people line up and one-by-one randomly pick a marble from the paper bag. The farther your position from the front of the line, the more likely someone in front of you will take the blue marble; however, the longer the blue marble goes unpicked, the greater the chances are of picking it (to the point that, if the blue marble remains in the bag after 9 people, the probability of the last person picking it is 100%). Considering all this, which position in line (from 1st to 10th) has the greatest probability of picking the blue marble? Or are they all somehow equal? Thanks!--El aprendelenguas (talk) 18:44, 1 September 2008 (UTC)


 * They are equal.
 * The first person picks the blue marble with a probability of 1/10.
 * The second one picks it with chance of 1/9 provided that the first one picked the red one (for which the chance is 9/10), so the final chance for the second person to pick the blue marble is 9/10 × 1/9 = 1/10.
 * The third one picks it with chance of 1/8 provided that the first one and the second both picked red marbles (for which chances are 9/10 and 8/9, respectively), so the final chance for the third person to pick the blue marble is (9/10 × 8/9) × 1/8 = 1/10.
 * For n-th person it is (9/10 × 8/9 × ... × (11-n)/(12-n)) × 1/(11-n) = (11-n)/10 × 1/(11-n) = 1/10.
 * CiaPan (talk) 19:33, 1 September 2008 (UTC)


 * Aaaah, that makes sense. Thank you very much!--El aprendelenguas (talk) 20:03, 1 September 2008 (UTC)


 * Put it in more general way. Let's mark our marbles with natural numbers (1 through 10) and let ten people pick them in order.
 * The first person picks one of them, and each marble has the same chance to be picked. So it is equally probable to get each of numbers 1 through 10 as first.
 * Then the second person picks a marble — and each of them has equal chance to be picked. So it is equally probable to get any sequence of two different numbers, from (1,2), (1,3), (1,4) and so on through (1,10), (2,1), (2,3), ... (2,10), ... (9,10), (10,1), (10,2), ... (10,9).
 * Proceeding this way we'll eventually get this result: each of 10!=3628800 permutations of ten numbers is equally probable as a result of this experiment.
 * Now let's assume all marbles are red, except the one marked with 3, which is blue. There are 9!=362880 permutations with 3 as the first number picked, 9! permutations with 3 at the second place, and similarly 9! permutations with 3 at any chosen position. So every person in a queue has the same chance to pick a marble 3, that is the blue one.
 * CiaPan (talk) 18:57, 2 September 2008 (UTC)


 * Here is yet another approach, this one based on intuitive reductio ad absurdum. Let's assume we have 8 red marbles, a blue one and a green one. Suppose the probability of picking the blue marble by the n-th person differs from 1/10, say it is a bit greater than 1/10. This implies the chance of picking some other marbles must be less than 1/10. Suppose it is the green one which has reduced chance to take n-th place.
 * But what reason could cause such a difference? The chance of blind-picking any marble does not depend on its color! So why should a blue marble be 'privileged' to n-th place? What result would we get, if we take 9 red marbles and the green one? Will the green marble intercept the blue marble's privilege? (If so, how does it know the blue one is out of the game?) Or rather it will remain on its &lt;1/10 probability level in respect to the n-th place? (If so, which red marble would get its "n-th probability" raised?)
 * It's obvious all possibilities presented above are nonsense: the chances to get any particular marble on the chosen position are equal, and can not depend on marking one or all of them with distinct colors. CiaPan (talk) 18:35, 3 September 2008 (UTC)

bernoulli trials with unique p
A Bernoulli Trial, which results in a Binomial Distribution, results when the events are independent and with the same probability. What is the distribution called when the probabilities of the independent events are not equal? And are there any online applets to let you graph the distribution? I would imagine those combinatorics would be a nightmare to calculate without a program. Thanks. --VectorField (talk) 20:06, 1 September 2008 (UTC)


 * I'm not sure I understand the question. The binomial distribution has one of two possible outcomes for each among a succession of independent trials.  One of these outcomes occurs with probability p and the other with probability 1 &minus; p.  (Of course, p and 1 &minus; p need not be equal.)  In general, what you are asking seems to be something like the following: what if the probability p changes in some definite deterministic way from trial to trial.  In that case, you may want to look at multinomial distribution.  This isn't a complete answer, but may help to point you in the right direction.  siℓℓy rabbit  (  talk  ) 20:46, 1 September 2008 (UTC)


 * I am looking for a two-outcome distribution where the p is different from trial to trial. For example, a distribution of the number of heads when I flip four unfair coins with heads probabilities of (30%, 40%, 60%, 70%). It would not be the multinomial distribution, which is even more far afield of this than a binomial distribution. Are there any applets which would generate such a distribution. Even though I could work out the combinatorics of such a problem, I am working with a large data set (>30 trials), so I am looking for an applet that would do it for me. --VectorField (talk) 21:02, 1 September 2008 (UTC)
 * You can use multinomial distribution for this provided all coins are tossed equally often. Take one trial to be the toss of each of the four coins and the outcome to be the number of heads. Taemyr (talk) 23:52, 1 September 2008 (UTC)
 * The OP seems to be looking to find a way to actually calculate this distribution. Setting the p's of the multinomial distribution to the results of the calculation doesn't actually accomplish anything. With a data set that size, your best bet would be to use the Monte Carlo method. That is, running simulations. --Thegoodearth (talk) 00:05, 2 September 2008 (UTC)

Consider the set of numbers from 1 through n,
 * $$\mathbf n = \{1\cdots n\},$$

and the set of i-subsets of $$\mathbf n$$,
 * $$\tbinom \mathbf n i = \{S : (S\subseteq \mathbf n) \land (|S|=i)\}$$

then the probability of obtaining i hits out of n trials, when the kth hit probability is pk, is
 * $$\sum_{S\in \tbinom \mathbf n i }\prod_{k\in\mathbf n}((k\in S) p_k +(k\notin S)(1-p_k))$$

where the Iverson bracket $$(k\in S)$$ is 1 if the number k is a member the set S, and 0 otherwise. So the expression $$(k\in S) p_k +(k\notin S)(1-p_k)$$ is $$p_k\,$$ if $$k\in S$$ and $$1-p_k\,$$ if $$k\notin S.$$

If all pk are equal to p you get the binomial distribution as a special case.
 * $$\sum_{S\in \tbinom \mathbf n i }\prod_{k\in\mathbf n}((k\in S) p +(k\notin S)(1-p))=

\sum_{S\in \tbinom \mathbf n i }p^i (1-p)^{n-i}= \tbinom n i p^i (1-p)^{n-i}.$$ Bo Jacoby (talk) 11:14, 2 September 2008 (UTC).

This is a problem that is easily solved by generating functions. The probability of getting $$i$$ heads equals the coefficient of $$x^i$$ in the formal product
 * $$\prod_{k=1}^n (p_k x + (1-p_k))$$.

The product can be computed automatically by any computer algebra system, some of which are available as free software. For example, with the probabilities 30%, 40%, 60%, 70% we get
 * $$(0.3x + 0.7)(0.4x + 0.6)(0.6x + 0.4)(0.7x + 0.3) = 0.0504x^4+0.2484x^3+0.4024x^2+0.2484x+0.0504$$

indicating for example that the probability of getting 3 heads is 24.84 %. 84.239.160.166 (talk) 19:50, 3 September 2008 (UTC)
 * That is beautyful. I wonder why the generating function $$(1-p+p x)^n$$ is not found in the article on the binomial distribution. Bo Jacoby (talk) 10:29, 4 September 2008 (UTC).
 * That is an example of a probability-generating function. This suggests an improvement to the probability distribution template for the discrete case (where type=mass).  Good catch. Baccyak4H (Yak!) 13:11, 4 September 2008 (UTC)