Jump to content

Wikipedia:Reference desk/Mathematics: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 213: Line 213:


:Can you give us an example ? I don't understand how you can concatenate different flies' data together. Isn't there a discrepancy at the joins (a discontinuity in the curve) ? [[User:StuRat|StuRat]] ([[User talk:StuRat|talk]]) 05:39, 30 November 2012 (UTC)
:Can you give us an example ? I don't understand how you can concatenate different flies' data together. Isn't there a discrepancy at the joins (a discontinuity in the curve) ? [[User:StuRat|StuRat]] ([[User talk:StuRat|talk]]) 05:39, 30 November 2012 (UTC)

:: I'm not plotting against time. I have the following code (summarising)
<pre>
p = 1;
while p <= number of experiments
n=1;
while n <= number of flies in experiment
speed = cat(2,speed,cor(n,p).logx) %concatenation along the 2nd dimension in MATLAB, or just joining arrays together end to end
kurv = cat(2,kurv,cor(n,p).logy)
n = n+1;
end
p = p + 1
end
</pre>

:: The result is that I have two very long arrays with all the time series joined together. However, I am plotting the nth element in one array (i.e. velocity) against the nth element the other (i.e. curvature). The order is kept because both arrays were joined in the same way. i.e. say I have the following velocity and curvature arrays taken in time, for a first fly and second fly
k1 = [a b c d] v1 =[e f g h]
k2 = [i j k l] v2 =[m n o p]

:: the nth element of k1 (the first fly) corresponds to the same moment of time as the nth element of k2, v1 or v2. i.e. a, e, i, m all represent data taken at some common frame.
:: When we join the arrays together we get k= [a b c d i j k l] v=[e f g h m n o p]. the first element in k corresponds to the first element in v, and the 5th element of k corresponds to the 5th element in v, though the data represents two flies. Correlation is maintained. You can add flies from other experiments (i.e. data taken on a different day) and the correlation is maintained.
:: It doesn't matter that there's a time discontinuity, because we are not plotting against time. We just have to ensure that v(n) and k(n) represent the same fly at the same moment. Then we can see how correlated that fly's curvature is to its velocity. Repeat for all n, which might be the same fly at a different moment, a different fly at the same moment, or a different fly at a different moment. [[User:John Riemann Soong|John Riemann Soong]] ([[User talk:John Riemann Soong|talk]]) 06:09, 30 November 2012 (UTC)

Revision as of 06:09, 30 November 2012

Welcome to the mathematics section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


November 24

set of equivalence relations

I want to know ,how to define mapping to prove : let ~ be a equivalence relation on the Ring R,we Say that it is compatible (with ring operations) iff a~b implies a+c = b+c , ac = bc ,ca = ba for all a,b,c belongs to R. prove that there is one to one correspondence between the ideals of R and the set of compatible equivalence relations on R . — Preceding unsigned comment added by 182.187.115.152 (talk) 07:05, 24 November 2012 (UTC)[reply]

Hint: Look at the kernel of the map that takes elements of R to their equivalence class:-)Phoenixia1177 (talk) 08:54, 24 November 2012 (UTC)[reply]

i donot get about this mapping ,please explain more — Preceding unsigned comment added by 182.187.116.9 (talk) 13:26, 24 November 2012 (UTC)[reply]

Statistics

According to the WIkipedia page about how many people are homosexual, it says it's 6% in the UK. So if I'm in a room of 40 people (including me), and the chance of any one person being homosexual is 6%, what is there chance that homosexuals are not a minority in the room, so at least 20 people in the room are homosexual.

I haven't done stats in quite a while, and I've forgotten how, so could you please explain how you get to the number. Many thanks for any help you can provide. 143.210.122.148 (talk) 18:12, 24 November 2012 (UTC)[reply]

You could use the binomial theorem and add together the sum of (20 NcR 40) 0.06^20*0.94^20 + (21 NcR 40) 0.06^21*0.94^19 + ...... + (40 NcR 40) .06^40*.94^0 .--Gilderien Chat|List of good deeds 19:54, 24 November 2012 (UTC)[reply]
Hi Gilderien, thanks for your response! I vaguely remember something like that in A-level maths. It doesn't really matter if I don't understand. So I have to type all of that into a calculator? There must be an easier way, no? Typing (20 NcR 40).06^20*0.94^20 + (21 NcR 40).06^21*0.94^19 + ... + (40 NcR 40).06^40*.94^0 would take ages! 143.210.122.148 (talk) 20:10, 24 November 2012 (UTC)[reply]
I doubt in most cases where this would make any difference that the events are independent. The chance of all 40 people in a room being homosexual are far higher than one would get from the binomial distribution. Otherwise there would be very few gay bars for instance. If the OP is included the chances are 0 if they are not homosexual (considering it to be a yes/no type of thing). There is no point the OP including or excluding themselves in the 20 as they know about themselves. Dmcq (talk) 20:42, 24 November 2012 (UTC)[reply]
By the way if you are really insistent on treating them as independent the best way then you can treat it as being approximately a Normal distribution. The mean is np and variance np(1-p), the standard deviation is the square root of this. If you work this out you have on average about 2.4 (plus the OP if that way inclined) and 20 is (20-2.4)/1.5 =11.7 standard deviations away, so the chances are really really tiny that there are any gay bars, I doubt there's any in the world Dmcq (talk) 20:57, 24 November 2012 (UTC)[reply]
Gilderien's formula is a simple line in many math programs, for example PARI/GP:
? sum (n=20, 40, binomial(40,n)*0.06^n*0.94^(40-n))
%1 = 1.556140404291757270521948976 E-14
That's 1 in 64261553600308. Explanation: The chance that a given group of n people are all homosexual is 0.06^n. The chance that none of the other 40-n are homosexual is 0.94^(40-n). The number of ways to choose n out of 40 people is called many things, for example (n NcR 40) by Gilderien, and binomial(40,n) in PARI/GP. See Combination and Binomial coefficient. The chance of exactly n homosexuals in total is binomial(40,n)*0.06^n*0.94^(40-n). The chance of at least 20 homosexuals is the sum of that for n = 20 to 40. This assumes "the chance of any one person being homosexual is 6%" also applies to you. PrimeHunter (talk) 02:40, 25 November 2012 (UTC)[reply]

Continuing Dmcq's approach. The probability that the OP is homosexual is not 6% because he (or she) is not a random person. He knows! If he is a homosexual he needs to know if 19 or more out of 39 random persons are homosexual. If he is not a homosexual he needs to know if 20 or more out of random 39 persons are homosexual. The expected number of homosexuals among 39 random persons is 39*0.06=2.34 homosexuals, and the standard deviation is √(39*0.06*(1−0.06))=1.4831 homosexuals. Now 19=2.34+11.2332*1.4831 and 20=2.34+11.9075*1.4831. The probabilities are the Q-function values Q(11.2332) and Q(11.9075). They are both zero according to [1]. Bo Jacoby (talk) 15:35, 25 November 2012 (UTC).[reply]

Thanks greatly to everyone that responded. I know there are gay bars, but I meant just if it is totally independent. Ok, so it was wrong to say including me, as I know about me, and I'm not homosexual. Most of you have gone far beyond my understanding of statistical maths; I don't at all understand the 11.7 or the Q-functions. But I do get the 1 in 64261553600308 and PrimeHunter's explaination. Thanks to you all! 143.210.122.124 (talk) 17:52, 25 November 2012 (UTC)[reply]

Calculating vector cross products

For this question the two vectors will be and . Is right? --Melab±1 21:38, 24 November 2012 (UTC)[reply]

(ec) No. See the last equation in Cross product#Coordinate notation. Most of your subscripts need to be rethought. Jheald (talk) 21:56, 24 November 2012 (UTC)[reply]
The easiest way to remember it is as a formal determinant:
where , , denote unit vectors in the x, y, and z directions. --Trovatore (talk)

That 3 × 3 determinant may be a useful mnemonic, but there are disadvantages;

  • clumsy because you have to expand the first row and end up with −j rather than +j every time, when each can be avoided,
  • abuse of notation: a matrix should have elements all from the same field, not a mix of different fields and vectors of some field,
  • determinants should be real numbers (by definition), this is a psuedovector.

A better way is

because this doesn't have the same problems, and the columns and basis vectors are just cyclic permutations of x, y, z components. Maschen (talk) 09:50, 25 November 2012 (UTC)[reply]

I think that's harder to remember, though. --Trovatore (talk) 09:59, 25 November 2012 (UTC)[reply]
Actually, there are other advantages to the formal determinant. It makes it obvious that the cross-product is antisymmetric, bilinear, and normal to both the original vectors. Once you have that you're not that far from nailing down the cross-product uniquely.
I disagree with some of your other statements:
  • First, a matrix is just a way of encoding a linear transformation. There is not in fact any requirement that all entries be from the same field. In fact, lots of matrices have elements that are other matrices.
  • Determinants don't have to be real numbers. They can certainly be from any field, maybe any (commutative?) ring — I'd have to think about it, or our determinant article may say something in this regard. In any case, the central feature of determinants is that they are multilinear and antisymmetric, which, lo and behold, are also two of the three most important facts about cross-products.
It's certainly true that the cross-product is not a determinant in the usual sense, but I think it's more finickiness than any real mathematical virtue to stick on that point. --Trovatore (talk) 10:13, 25 November 2012 (UTC)[reply]
The cyclic permutations are simply (y, z, i), (z, x, j), (x, y, k), or using a more sensible notation for the basis vectors (y, z, ex), (z, x, ey), (x, y, ez) where (i, j, k) = (ex, ey, ez).
An alternative is the cross product matrix:
Which may be easier? Maschen (talk) 10:06, 25 November 2012 (UTC)[reply]
See my remarks above. I've re-thought my original weak response; I think the determinant answer is the best one, and both the ones you mention are inferior to it. --Trovatore (talk) 10:14, 25 November 2012 (UTC)[reply]
Very well, just commenting. Best, Maschen (talk) 10:17, 25 November 2012 (UTC)[reply]

where is the Levi Civita pseudotensor. Count Iblis (talk) 04:14, 26 November 2012 (UTC)[reply]

For myself, the mnemonic I find instinctive for the cross product of two column vectors A and B, like the two up in the question, is to start with the first component, for that component forget the first row of the the two vectors, and make a "cross" out of the second and third row just like the determinant of a 2x2 matrix, so AyBz - AzBy. Then, for the next component, slide that "cross" down with wrap-around, so it still starts just the below the row you now want the component for, so: AzBx - AxBz. Then for the last component, slide the "cross" down one more (it's actually wrapped around completely now), so AxBy - AyBx.
Yes there are of course more sophisticated ways to think about the cross-product. But if I actually have to work one out from two column vectors, the above is still what I think to myself in my head while I'm doing it. Jheald (talk) 12:29, 26 November 2012 (UTC)[reply]


November 25

Fractal/continuum exterior product?

This seems like a really easy question but I can't seem to find the answer anywhere...

Is there such a thing as a "fractional/fractal/continuum exterior product" of a positive non-integer number of vectors? I.e. not just for a discrete number of vectors as in

but a continuum of vectors, in analogy with the continuous product, Gamma function, fractional calculus, or such like? Many thanks, Maschen (talk) 09:58, 25 November 2012 (UTC)[reply]

I don't think there is any such thing as a positive non-integer number of vectors, let alone their exterior product. Bo Jacoby (talk) 15:50, 25 November 2012 (UTC).[reply]
I was thinking it may be defined in terms of, or analogous to, the continuous product, i.e. using integrals and exponentials... Maschen (talk) 17:09, 25 November 2012 (UTC)[reply]
The continuous product is a product of an infinite number of factors, not the product of a fractional number of factors. Bo Jacoby (talk) 19:53, 25 November 2012 (UTC).[reply]
I'll just take the answer as a plain "no there isn't". (Maybe in a year or so I could come up with something... not that it would enter WP). Thank you anyway. Maschen (talk) 20:35, 25 November 2012 (UTC)[reply]
The exterior product is zero if the number of factors exceeds the dimension of the vector space. So a nonzero exterior product of a continuum of factors requires at least a continuum of dimensions. Maybe it makes sense. Bo Jacoby (talk) 00:14, 26 November 2012 (UTC).[reply]
The only "fractional product" I can think of is a power function, for which we start from integer powers. Even the gamma function (as interpolated from the factorial function) is from a product of a function of a related sequence. I doubt that defining a fractional product where the factors are unrelated occurs. So I assume then you are asking about a fractional power over the exterior product. Since we have
we have very little to extrapolate from to powers. One would probably require that
One could additionally choose whether the wedge-power operation be closed on the exterior algebra, or allow an extension (like the square root function being confined to reals or permitting an extension to complex numbers). Noting that there are (multivector) elements of the exterior algebra that when put to a positive integer (wedge) power are nonzero, both choices seem to allow rational wedge powers. The case of a fractional wedge power of sepcifically a pure 1-vector is a difficult case, like the square root of a negative real number: it probably cannot be accommodated if we require that this power be closed on the exterior algebra. — Quondum 05:20, 26 November 2012 (UTC)[reply]
Thanks, very nice answer, but I did mean a product of different vectors.
  • To put this into perspective, let a vector change with parameter(s), like a(a, b, c ...), never zero for any a, b, c,..., never parallel (in which cases the product would obviously be automatically zero). For the discrete case we have an integer number of vectors; a(a1, b1, c1...), a(a1, b2, c1...), a(a1, b1, c2...) etc... all non-zero, and non-parallel, and we could take the wedge product of them.
  • Rather than taking discrete values of a, b, c, ..., let them vary over some domain, then what would the exterior product of this continuum of vectors be? The problem seems to be the dimension of the space, as Bo Jacoby said above, since the number of linearly independent vectors in an n-dimensional space is n, so the number of vectors which can be exterior multiplied (to obtain a non-zero result) is ≤ n ...
  • On a separate note; a continuum of dimensions isn't a problem since fractals have non-integer dimension (including transcendental numbers calculated from natural logarithms).
  • To put this into more context, it should generalize the multivector as a sum of integer-grade elements, into an integral of a continuum of (real-number, or even complex?)-grade elements. It would be interesting if new mathematical objects could be developed in the process rather than confining ourselves to number systems or spaces we already know...
Maschen (talk) 18:19, 26 November 2012 (UTC)[reply]
From the last bullet, it sounds like your intention is to fill in the discrete spectrum of grades of the exterior algebra into a continuum of grades. Finding an extension to the algebra that does this is probably quite a different exercise from finding some operation that acts on a non-integer number of vectors. One would possibly want to retain certain properties, for example that the exterior product of a homogeneous p-grade element and a homogeneous r-grade element is a homogenous (p+r)-grade element, where p,q∈ℝ. Not so? — Quondum 03:16, 27 November 2012 (UTC)[reply]
It should be... a constraint on the definition. Why should that not hold? As said, no reason not to extend beyond the algebra while defining such a product... Maschen (talk) 07:50, 27 November 2012 (UTC)[reply]
You're pretty ambitious. If the cardinality of the dimensions of your algebra is to be the continuum, I expect you'll have serious difficulties. If you're just looking for some abstract properties (such as exponentiation, powers, logarithms etc.), fractional grades are not needed. Beyond that, I'm a bit lost. — Quondum 08:20, 27 November 2012 (UTC)[reply]

This seems like a really easy question but I can't seem to find the answer anywhere... Really easy questions tend to be the hardest of all. :-) So I agree with Quondum that you are pretty ambitious. Some late-night speculations, no guarantee they make the slightest sense: exterior algebra is a quotient of Tensor algebra. It might be easier to think about the same questions for tensor algebras first. Second, following Quondum, there are two things desired here, corresponding to the 2 desired operations of "addition" and "multiplication" - a continuum of grades and a continuum operation respecting the grades. Now there is a well-known construction that might be thought of as corresponding to the adding of the various homogeneous grade spaces - the Direct integral. If you could develop a tensor/exterior analog of that, and take direct integrals of the various spaces you get, then that could be what you are looking for. A category-theoretic treatment of the direct integral might help, and the above musings might give some hint where to look to see if somebody has concocted this stuff already - operator algebra theory, non-commutative geometry after Connes. John Z (talk) 09:16, 29 November 2012 (UTC)[reply]

complex analysis

If G is an open set then curve γ is homologous to zero if for all ω belonging to ₵-G η(γ;ω)=0. How i can prove this? — Preceding unsigned comment added by 14.99.166.149 (talk) 17:13, 25 November 2012 (UTC)[reply]

What is η? Winding number? Do you mean "γ is homologous to zero in ₵-G?" What tools are you supposed to be using? Staecker (talk) 18:44, 25 November 2012 (UTC)[reply]

complex analysis (part 2)

I want to know what is orientation? If (1,0,∞) is the orientation of R,then the cross ratio (z,1,0,∞)=? — Preceding unsigned comment added by 14.99.166.149 (talk) 17:25, 25 November 2012 (UTC)[reply]

See Orientation (vector space), Orientation (geometry), and Cross-ratio. Moonraker (talk) 05:45, 26 November 2012 (UTC)[reply]
I changed the title to be unique. Please keep your titles distinct from each other, or the software has fits. StuRat (talk) 06:49, 26 November 2012 (UTC) [reply]


November 26

Can anyone tell me what the full sine rule (including 2r) is? thanks.

I'm doing British mathematical olympiad round 1, and the one thing in the booklet of reccomended things you ought to know, but I don't actually know if it mentions the full sine rule-which I knew last summer but now I've forgotten. I presume that r is radius, but radus of what? — Preceding unsigned comment added by 86.176.99.71 (talk) 18:38, 26 November 2012 (UTC)[reply]

Does Law of sines#Relation to the circumcircle give you what you are looking for? Looie496 (talk) 20:29, 26 November 2012 (UTC)[reply]
thanks it does indeed. that was relatively simple after all-if only they could say so in as many words... — Preceding unsigned comment added by 86.176.99.71 (talk) 20:24, 27 November 2012 (UTC)[reply]
Draw a circumcircle on your triangle, then slide the vertex A along the circle's arc to make B a right angle. Based on an inscribed angle theorem the A angle keeps its measure unchanged (blue and green on the picture), so does the BC chord. Now it's clear that sin(A) = a/(2R), isn't it? --CiaPan (talk) 06:32, 28 November 2012 (UTC)[reply]
Thanks from me too, CiaPan! That's a very nice demonstration, new to me even though I've used the result. Duoduoduo (talk) 15:32, 28 November 2012 (UTC)[reply]
Glad to be helpful. However, despite how nice demonstration it is, it's not a valid proof. :( Would be better to ask to shift A so that AC becomes the circle's diameter, then use the Thales' theorem to obtain 'B is a right angle'.
Furthermore the procedure would not work for obtuse triangle with A > 90°, unless we replace A with a new vertex D on the other side of BC and prove
    1. D = 180° − A
then
    2. sin D = sin A
CiaPan (talk) 06:30, 29 November 2012 (UTC)[reply]

November 27

I Can't Post!!!


     The LaTeX code that I have input as part of a post that I have been working on for this reference desk won't display in the section creator's preview area most of the time!!! It doesn't matter whether I set my "Appearance → Math" preferences to either "Always render PNG" or use "MathJax (experimental; best for most browsers)" because the former setting results in an error message of "Failed to parse (Lexing error):" followed by my original LaTeX and the latter surrounds my code in dollar signs without rendering it. I've been trying to use my family's iMac, which is a mid-2007, 24" model running Safari 5.0.6 over the Intel version of Mac OS X 10.5.8 Leopard without a local LaTeX installation, to post my question for a few days now, so if anyone can help me figure out what's going on, that would be marvelous! BCG999 Out. (talk) 20:30, 27 November 2012 (UTC)[reply]

There might be a problem with the LaTeX code your using. Wikipedia only supports a subset of LaTeX code and does not suport any packages. See Help:Formula for wikipedia specific LaTex help. If you post the latex your using here, either in plain text or with errors we might be able to help you.--Salix (talk): 21:04, 27 November 2012 (UTC)[reply]

     I wasn't using any packages, and LaTeX usually renders for me even though I don't personally have it installed on my family's machine, though that probably doesn't matter and is the case because Wikipedia most likely has LaTeX installed on its servers. Here's the code that I was using in the other post that I was going to add to the reference desk as a new question:
Failed to parse (syntax error): {\displaystyle P(E)={}^{\[\text{Number of outcomes in event}\]}/{}_{\[\text{Total number of outcomes in sample space}\]}}
Failed to parse (syntax error): {\displaystyle \[\text{Rolling an even number}\]=\{2, 4, 6\}}
Failed to parse (syntax error): {\displaystyle \[\text{Sample space over a 6-sided die}\]=\{1, 2, 3, 4, 5, 6\}}
Failed to parse (syntax error): {\displaystyle \[\text{Number of outcomes in event}\]}
Failed to parse (syntax error): {\displaystyle \[Total number of outcomes in sample space}\]}
Failed to parse (syntax error): {\displaystyle \[\text{Number of outcomes in event}\]=\|A\| \[Total number of outcomes in sample space}\]=\|S\| }
Shouldn't this render fine?
BCG999 Out. (talk) 21:58, 27 November 2012 (UTC)[reply]
Firstly you need \left[ or just [ rather than \[. there also a couple of unmatched {} brackets. The following should render fine.--Salix (talk): 22:25, 27 November 2012 (UTC)[reply]
Thanks a lot, Salix; I should have double checked my code manually instead of just selecting the "Fix Math" command provided by WikiEd. I'll be posting my actual question with this revised LaTeX code soon, thanks again to you.
BCG999 Out. (talk) 00:23, 28 November 2012 (UTC)[reply]

November 28

Generating correlated non-normal random variables

A question about generating correlated random variables with non-normal distributions.

I have a Monte-Carlo-type problem requiring that I generate a series of pairs (and maybe n-tuples) of correlated random variables with a correlation coefficient of rho. I know how to do this when they are normally distributed (by using a Cholesky decomposition of the covariance matrix). But what if they are not normally distributed? I’m particularly thinking about multivariate uniform distributions, t distributions, Laplace distributions and some fat-tailed distributions like the Cauchy or Levy.

I found a suggestion to generate two univariate series, X1 and X2, and then define a new series X3 as rho X1 + sqrt(1-rho^2) X2, so that X1 and X3 will be my correlated random variables. But doesn’t this method ONLY work for normally distributed random variables? Is there an equivalent sort of thing that I can do with other distributions, like uniform or t?

And what about fat-tailed distributions with no finite variance? Since they have no finite variance, I presume that the correlation coefficient rho, which is derived from variances and covariances, has no equivalent. How does correlation work in such cases? Thorstein90 (talk) 05:04, 28 November 2012 (UTC)[reply]

I think you're going to have to specify a bit better, and perhaps think a bit more about, what multivariate distribution you want. I doubt that the distribution of the individual variables, combined with a covariance matrix, is actually enough to determine the multivariate distribution. --Trovatore (talk) 03:16, 28 November 2012 (UTC)[reply]
There are a few that I would like to try. I think that I can use an R function for the multivariate t distribution, and with one degree of freedom this will define for me a multivariate cauchy distribution (if I understand correctly). But I'd also like to try drawing randomly from multivariate uniform, laplace, pareto and levy distributions and in the absence of any usable functions I was wondering if there is some way that I can make the univariate draws correlated. Thorstein90 (talk) 05:04, 28 November 2012 (UTC)[reply]
According to stable distribution,
a random variable is said to be stable (or to have a stable distribution) if it has the property that a linear combination of two independent copies of the variable has the same distribution, up to location and scale parameters. The stable distribution family is also sometimes referred to as the Lévy alpha-stable distribution.
So if you use a stable distribution with finite variance, you could generate iid variables X and Z, and generate Y = a + bX + cZ. Then cov(Y, X) = cov(bX, X) = b×var(X), and var(Y) = b2var(X) + c2var(Z). Then corr(X, Y) = cov(X, Y)/ stddev(X)stddev(Y) = b×var(X)/sqrt{var(X)[b2var(X) + c2var(Z)]}. Set b and c equal to whatever you want to get the desired corr(X, Y). Duoduoduo (talk) 16:04, 28 November 2012 (UTC)[reply]
And the above gives you the two free parameters b and c, so you can pin down desired values of two things: var(Y) and corr(X, Y). Also the parameter a allows you to control the location of the Y distribution. Duoduoduo (talk) 16:09, 28 November 2012 (UTC)[reply]
OR here: Draw N observations on X from, say, a uniform distribution. Now since the sequence in which these happened to be drawn does not alter the fact that they were drawn from a uniform distribution, you can shuffle these in any way you like into a data series Y that is also drawn from a uniform distribution. For example, using mod N arithmetic, you could generate Yn = Xn–k for any lag value k. Then experimenting around with different values of k, you could find the one that gives you a corr(X, Y) that is closest to what you want. Whether or not this would be appropriate for the use to which you're going to put the simulated data would depend on what that use is.
In fact, suppose you do the above with data drawn from an infinite-variance distribution. Since you're only drawing a finite number of data points, your sample variances and covariances will be finite, so the above procedure still applies. Duoduoduo (talk) 16:43, 28 November 2012 (UTC)[reply]
You could ask at the Computing Reference Desk whether there are any packages that would have a simple command to draw from, say, a multi-uniform distribution. Duoduoduo (talk) 16:50, 28 November 2012 (UTC)[reply]
As for situations with infinite variances when it can't be finessed with a finite sample covariance, our article Covariance#Definition says
The covariance between two jointly distributed real-valued random variables x and y with finite second moments is defined as.... [bolding added]
And I don't see any way to get around that boldfaced restriction by limiting ourselves to one particular definition that doesn't actually involve variances. So regarding your question "How does correlation work in such cases?", I think the answer is that it doesn't -- you can't generate or even conceptualize two infinite-variance random variables with a covariance of rho. Duoduoduo (talk) 17:33, 28 November 2012 (UTC)[reply]
However, when variances and covariances don't exist, there can still be measures of the variables' dispersions and co-dispersion. See elliptical distribution -- in that class of distributions, in cases for which the variance does not exist, the on-diagonal parameters of the matrix are measures of dispersion of individual variables, and the off-diagonal parameters are measures of co-dispersion. Duoduoduo (talk) 17:45, 28 November 2012 (UTC)[reply]
A little more OR here: Take a look at Normally distributed and uncorrelated does not imply independent#A symmetric example. It points out that if X is normally distributed, then so is Y=XW where P(W=1) = 1/2 = P(W= –1) and where W is independent of X; but cov(X,Y) = 0. I think this preservation of the form of the distribution holds for any symmetric distribution, not just the normal. And I think that if you specify P(W=1) = p and P(W= –1) = 1–p, then as p varies from 0 to 1/2 to 1 the correlation between X and Y varies from –1 to 0 to 1. If this is right, then this is probably the answer to your question for all finite-variance symmetric distributions. Duoduoduo (talk) 18:20, 28 November 2012 (UTC)[reply]
X is centered on zero of course. Duoduoduo (talk) 18:40, 28 November 2012 (UTC)[reply]
All very interesting suggestions, thank you. I will have a look into these. Am I correct in interpreting your 'stable distribution' suggestion with the X, Y and Z as being something that applies only for sufficiently large N, as in the case of the central limit theorem? I am also curious if you have any opinion on the usefulness of copulas for problems such as these. I don't properly understand copulas and am unsure whether they are necessary for my problem. Thorstein90 (talk) 23:50, 28 November 2012 (UTC)[reply]
I don't know much of anything about copulas, but from a glance at the article I don't see how they could help.
An analog to the central limit theorem would involve adding together a sufficiently large number of random variables. That's not involved here -- you can just add two random variables from a stable distribution and end up with the sum being of the same distribution. Now if by N you mean the number of simulated points, then even for X and Z, as well as for Y, if N is small then a plot of your simulated points won't look like it's from that distribution, even though you know it is. But for a large number of simulated points, a plot of the X data, the Z data, or the Y data will indeed give a good picture of the underlying distribution. Duoduoduo (talk) 17:34, 29 November 2012 (UTC)[reply]

Request for Help Deriving the Formula Describing the Probability that a Set of Event Outcomes Might Occur for Make-Up Homework


     Hello again, could somebody help me figure out how to derive the actual equation for probability so that I can get started on some homework that I'm doing to catch up in my Probability and Statistics class? I would like to directly input the event or events and sample space associated with each probability I need to calculate for my homework–equations with fillable variables, after all, tend to trump those with words in the field of mathematics–, but my textbook, Elementary Statistics: Picturing the World, Fourth Edition by Ron Larson and Betsy Farber, only gives me the formula, as displayed below using my own conventions, in words:

Curiously, this same textbook also gives examples of events whose probability one could find using this equation in the notation used to denote sets in set theory, as one could see if he or she wrote down, say, the event of rolling an even number on a standard, six-sided die as follows:

Similarly, the sample space one would use in the context of an experiment he or she might have begun to investigate how many even numbers he or she could roll using the provided six-sided die would also, as defined by my book as a convention, simply contain every single value one could obtain from rolling this given die:

I found it obvious that one could not directly input the outcome sets given for each event and sample space involved in each assigned probability problem directly into the probability formula given by my text. Therefore, I assumed that I must convert this formula, which unnecessarily requires one to input the number of elements which exist in each given outcome set, into one that accepts these originally-given outcome sets as inputs. The number of inputs in the outcome sets given by each assigned problem as the definition of each involved event and sample space is, of course, the cardinality of each of these sets. If I assign the outcome set whose cardinality gives to the set A and the outcome set whose cardinality gives to the set S, then I can formalize these definitions using mathematics prior to substituting the sets A and S for an event and the sample space that contains it. So:

Plugging these two equations into the original formula given by my textbook for finding the probability of an event results in the following formula, which now accepts sets as arguments just like I wanted:


     I now have the equation I was looking for in the first place. However, the sample space acts as a limit on this function's domain such that , and what my book calls the "Range of Probabilities Rule" likewise limits the range of this function to between 0 and 1, inclusive. I would like to explicitly define these limits which exist for the formula for finding probability if possible. The article on functions provides a notation which would allow me to do so, but it unfortunately spans multiple lines as shown below:

So, here's my question: does a single-line, f(x) notation that expresses the same information as the above mapping exist? I tried to create one myself…:

…but neither this nor the same function with the outermost parentheses from each side of the equation replaced with the brackets of set notation seems right to me. Could somebody help me out?

Thanks in advance, BCG999 (talk) 20:00, 28 November 2012 (UTC).[reply]

Not sure that I fully understand your question, but here goes. I think your function definition
looks just fine. You could call the right hand side f(|A|, |S|) so
Then
f: N* × N → [0, 1] ∩ Q
|A|, |S| →
where Q is the set of rationals, N refers to the set {1, 2,...} and N* × N refers to the set of pairs (a,b) in {0, NN such that a≤b. Probably a better notation exists than N* × N. I don't see how you could collapse the last two lines into a single line though. Duoduoduo (talk) 18:22, 29 November 2012 (UTC)[reply]


     Hey, Duoduoduo; didn't you mean that I could call the left-hand side ? However, I don't think that this notation could be the basis of what I want to write down as part of my homework because I want the function to take the sets and as its inputs, not their cardinalities and . This is because the function takes these cardinalities internally all by itself. Therefore, shouldn't my basic function use the letter to represent the input event's set of outcomes instead of the letter while also taking the sample space that contains this input event as an input? If I were to make these changes, then the basic function–the one that you said looked fine–should read unless the standard notation used to denote functions needs modifications to take sets as arguments instead of variables. Also, I'm a bit confused about how you mapped the function's domain to its range because I'm not quite sure that I understand how you defined the set denoted by and the product of the sets and . I know that you could have explained that the set of the elements is equivalent to the set of all natural numbers except, but you've lost me after that. As for needing to collapse this map-based function definition into one using the standard notation, I need to do this because my Probability and Statistics class is actually a high school one, which means that my teacher wouldn't expect me to have ever even seen the former notation. Maybe we could express the limits that I need to place on the probability formula's domain and range as conditions on the function to the right of it and a comma? I really need to do this because I'm trying to understand where all of this probability stuff comes from and my book's original, word-based definition didn't really help me that much at all to do this so that I could make sure I have all of the formulas that I need for my homework assignment before I begin.

P.S.: Is it okay if I fixed how some of your math looks? I made it LaTeX, like mine. Also, your name prompted a little Pokémon-related non sequitur, by the way…
I'm sure you didn't realize it, but it's bad etiquette to change anyone's post. As for the Pokémon-related non sequitur, I'm from the older generation and, believe it or not, have no idea what pokemon is. I'd be curious to know what the non sequitor is.
The notation P(E) conventionally means the probability (P for probability) of event E happening. So I think the notation P(A, S) or P(|A|, |S|) is not good. That's why I used f. P(A, S) would mean the probability of both A and S occurring, which is not what is intended.
You say "I'm not quite sure that I understand how you defined the set denoted by and the product of the sets and .". The notation is not a product -- it means that we're talking about a two-dimensional space we're mapping from; one of the dimensions is N* for one of the arguments of the function, and the other dimension is N for the other argument.
I'm kind of reluctant to try my hand at helping out with this any more, for two reasons: your question really pushes the boundaries of what I understand about set notation, and we're not really supposed to be helping out with homework anyway. I'm impressed, though, by the sophistication of your high school homework! Duoduoduo (talk) 22:53, 29 November 2012 (UTC)[reply]

Calculating an invariant ellipse

Hi. Suppose we have a linear map on the plane, given by a 2x2 matrix, which has complex eigenvalues and determinant equal to 1. The invariant sets in the plane under this transformation - if I'm not mistaken - should be ellipses. Does anyone know the easiest way to find the equations of these ellipses, given the matrix of the transformation? Thanks in advance. -68.185.201.210 (talk) 23:19, 28 November 2012 (UTC)[reply]

If the matrix is and the invariant ellipse family is , for any the LHS must be equal for and , thus the coefficients must be equal. By solving (and letting ) we get
-- Meni Rosenfeld (talk) 08:51, 29 November 2012 (UTC)[reply]
Thanks a million! -68.185.201.210 (talk) 15:14, 29 November 2012 (UTC)[reply]
You might be interested to look at Matrix representation of conic sections and Conic section#Matrix notation. Duoduoduo (talk) 18:41, 29 November 2012 (UTC)[reply]
Probably just brainlock on my part, but I don't understand Meni Rosenfeld's answer. If we write = R2 and and equate coefficients, we get e=a, f=b+c, and g=d. (Generally b and c are taken as equal.) Duoduoduo (talk) 18:52, 29 November 2012 (UTC)[reply]
I got the same answer as Meni Rosenfeld, but not using the equation you wrote down. I set , and then equated coefficients in , which I don't think is the same thing. This answer also agrees with the actual ellipses I'm looking at in my application, so I'm confident that it's right. -129.120.41.156 (talk) 23:23, 29 November 2012 (UTC) (O.P. at a different computer)[reply]
Thanks. I misunderstood what the matrix was. Duoduoduo (talk) 23:29, 29 November 2012 (UTC)[reply]
So, the other matrix you wrote down would be.... some kind of quadratic form associated to the transformation? Is there a nice bijection there, or do we get equivalence classes on one side? -68.185.201.210 (talk) 03:12, 30 November 2012 (UTC)[reply]

November 29

Reflected image of a point in a plane, R^3

Hello. What is the quickest analytic method to find the reflected image P' of a point P(x0,y0,z0) across an arbitrary plane π: ax+by+cz+d=0 in R3? I solved the problem by picking an arbitrary point on π then considering vectors and projections but this is a lengthy and ugly process. Thanks. 24.92.74.238 (talk) 02:58, 29 November 2012 (UTC)[reply]

You want to find the point which is an equal distance from the plane, on the far side, on the normal vector to the plane, through the original point ? If so, once you find the normal projection of the point onto the plane, finding the point on the opposite side is almost trivial. If point 0 is the original, point 1 is the normal projection onto the plane, and point 2 is the reflected point behind the plane, find point 2 as follows:
x2 = x0 - 2(x0-x1)
y2 = y0 - 2(y0-y1)
z2 = z0 - 2(z0-z1)
StuRat (talk) 03:28, 29 November 2012 (UTC)[reply]
Yes; see http://www.9math.com/book/projection-point-plane for a more explicit answer. Looie496 (talk) 19:47, 29 November 2012 (UTC)[reply]

November 30

the R^2 of (X,Y) aggregated samples is much larger than the R^2 of individual samples of (X,Y)

I collect/calculate velocity and curvature data for about 15 fruit flies of a certain genotype per experiment for 8000 frames. Then I have N experiments. (Also actually they are log velocity and log curvature data so I can calculate a power law.)

If I aggregate the data, i.e. I concatenate velocity time-series array for one fly, with another fly's time series, and then for all the flies of a genotype (say, 135), and repeat the same for the curvature time series, such that the nth element of the concatenated velocity array corresponds to the nth element of the concatenated curvature array, I get a pretty high R^2: 0.694.

But when I take the average of the individual R^2's, the R^2 average is as low as 0.193.

Roughly the same magnitude of difference happens with every other genotype. How do I explain this? I don't think it's Simpson's Paradox, which I don't think would give a higher R^2 if there were two different distributions, and I don't see two different distributions when I look at the log-log plot. John Riemann Soong (talk) 05:30, 30 November 2012 (UTC)[reply]

Can you give us an example ? I don't understand how you can concatenate different flies' data together. Isn't there a discrepancy at the joins (a discontinuity in the curve) ? StuRat (talk) 05:39, 30 November 2012 (UTC)[reply]
I'm not plotting against time. I have the following code (summarising)
p = 1;
while p <= number of experiments
  n=1;
  while n <= number of flies in experiment
 speed = cat(2,speed,cor(n,p).logx) %concatenation along the 2nd dimension in MATLAB, or just joining arrays together end to end
 kurv = cat(2,kurv,cor(n,p).logy)
n = n+1; 
  end
p = p + 1
end
The result is that I have two very long arrays with all the time series joined together. However, I am plotting the nth element in one array (i.e. velocity) against the nth element the other (i.e. curvature). The order is kept because both arrays were joined in the same way. i.e. say I have the following velocity and curvature arrays taken in time, for a first fly and second fly

k1 = [a b c d] v1 =[e f g h] k2 = [i j k l] v2 =[m n o p]

the nth element of k1 (the first fly) corresponds to the same moment of time as the nth element of k2, v1 or v2. i.e. a, e, i, m all represent data taken at some common frame.
When we join the arrays together we get k= [a b c d i j k l] v=[e f g h m n o p]. the first element in k corresponds to the first element in v, and the 5th element of k corresponds to the 5th element in v, though the data represents two flies. Correlation is maintained. You can add flies from other experiments (i.e. data taken on a different day) and the correlation is maintained.
It doesn't matter that there's a time discontinuity, because we are not plotting against time. We just have to ensure that v(n) and k(n) represent the same fly at the same moment. Then we can see how correlated that fly's curvature is to its velocity. Repeat for all n, which might be the same fly at a different moment, a different fly at the same moment, or a different fly at a different moment. John Riemann Soong (talk) 06:09, 30 November 2012 (UTC)[reply]