Wikipedia:Reference desk/Archives/Mathematics/2006 August 17

calculus
While finding maxima and minima why are the conditions on nth derivative of ood order and even order different           17th august


 * Because if all of the derivatives up to n are 0, The function can be approximated as
 * $$f(x) = f(x_0) + a(x-x_0)^{n+1}$$
 * And the behavior of a power function depends on the parity of the exponent - it is antisymmetrical for odd exponents (positive on one side and negative on the other), and symmetrical for even exponents (either positive or negative on both sides). Only on the latter case can you have an extremum. -- Meni Rosenfeld (talk) 09:19, 17 August 2006 (UTC)

[copied from User Talk:Meni Rosenfeld:] thank you but if you could elaborate more i will be grateful —The preceding unsigned comment was added by Shaily iitian (talk • contribs).


 * You cannot expect me to put more effort in explaining this then you put in understanding my explanations. Where do you study calculus? Have you tried consulting with your teachers\proffesors or classmates about this? What did you attempt while trying to work this out yourself? Which part of my explanation was unclear to you? Once I know all of this, I will be better able to assist you. -- Meni Rosenfeld (talk) 09:55, 17 August 2006 (UTC)

Statistical test for oscillations?
Imagine I have a time series of values which I expect to oscillate, although with a lot of noise also, and perhaps also some small trend component.

For example if I calculated the ratio of average house prices in London divided by the average house prices in Newcastle (a large city in northern england) over many years, then I would expect this ratio to oscillate, as typically house prices will rise first in London and then two or three or four years later they rise in Newcastle as prices have stopped rising in London.

How could I go about confirming that there was an oscilation, rather than it just being a random coincidence that just seemed like an oscillation on a graph? Is there any statistical test or other method I could use please?

The oscilations may not necessarily be a sine wave. 81.104.12.10 22:17, 17 August 2006 (UTC)


 * Well, if you have a set of points, collected data, I don't think there's a test that says "this is an oscillation" or "this is not an oscillation". If you assume it to be an oscillation, you can make all sorts of conclusions about the oscillation based on the data (i.e. period, amplitude, Fourier analysis), and that assumption may lead you to a create a mathematical model (usually a sum of trig functions having harmonically related periods) which approximates your data. The real test of whether it is truly an oscillation is to collect more data and see how well it follows your mathematical model. - Rainwarrior 23:06, 17 August 2006 (UTC)


 * There is nonparametric time series analysis, which involves Fourier transform of your time series. First two steps in the analysis are detrending, which is removing the linear component through the regression, and deseasoning which is removing the oscillating components. To determine the periods of those you need to analyze the spectrum of the process. The residuals are supposedly the true noise, which after rescaling becomes white (that is with mean 0) uniform or normal noise. I would strongly recommend reading the book S. Efromovich, Nonparametric Curve Estimation. Methods, Theory, and Applications. Springer Series in Statistics, 1999, ISBN 0-387-98740-1. (Igny 00:05, 18 August 2006 (UTC))


 * Maybe our (stubby) article on Analysis of rhythmic variance is of some use here. I haven't read the publications referred to and don't know if they give a test for significance. If you have sufficient computational power, here is something you can do to compare various models for significant improvement in fit.


 * 1) The assumption is that you have two classes of models M0 and Ma ; for example M0 = "horizontal lines" versus Ma = "sloped lines", or M0 = "sloped lines" versus Ma = "sloped lines with some sinusoidal wiggle superimposed". Ma must be a superset of M0.
 * 2) Find the models m0 and ma from these two classes that best fit the data of your time series (using least-squares fit), and compute your test statistic x as the ratio of the residual variances vara / var0, which should yield a value in [0,1].
 * 3) Apply the same procedure to a large collection (say N = 10000) of random time series on the same set of time coordinates (and therefore having the same length) as your time series. (Use a Gaussian distribution.) The collection of values obtained gives you the distribution of the test statistic under the null hypothesis. Count the number of times Nx that the resulting value exceeds the test statistic x.
 * 4) The fraction of Nx / N is again a number in [0,1]. Compare it with a predetermined significance level, for example 0.05. If it is less, you can reject the null hypothesis; the result is statistically significant. Otherwise, you have insufficient evidence that you aren't seeing just noise.
 * Please be aware that this Fisher-style statistical hypothesis testing is not uniformly accepted as based on firm ground. --Lambiam Talk 00:28, 18 August 2006 (UTC)

Thanks. If I had a large number of ratios between many different cities, and I wanted to put them in order of the strength of the oscillations, would it make any sense to do a fourier analysis on each of the ratios and calculate a figure of merit for it by dividing the amplitude of the frequency of the largest amplitude by the average amplitude of all the other frequencies of that ratio?
 * Sorry, no, that doesn't feel right. It might put very weak oscillations ahead of strong ones. I'd actually work with the log of the ratios, and look at the absolute size of the amplitude of oscillations for ordering by "strength". This is logically independent of the statistical significance, which is not meant to assess strength, but rather signal as opposed to noise. A weak signal can be less noisy than a strong one. If the strength is very low, the question whether it is significant becomes moot. --Lambiam Talk 09:19, 18 August 2006 (UTC)

Hmmmmmmn. "I'd actually work with the log of the ratios" - why would this be any better please?, "and look at the absolute size of the amplitude of oscillations for ordering by "strength"." - do you just mean the amplitude between the peaks and troughs of the raw data?

I have been thinking about this as a possible investment strategy - move back and forth between cities A and B by moving house from one city to the other when you expect house prices in the other city to rise more than the city you are in. This should mean that you can buy a more and more expensive house each time.

If you have a number of pairs of cities to choose from, then you want to choose a pair whose ratio has a high amplitude of cycle, and one that has a clear cycle without what you've seen in the past merely being random fluctuations. Any ideas as to how to best choose these from a large number of different ratios please?
 * I'm rather skeptical that the whole idea is going to pan out, but if you get rich this way, remember me. Why the log? Well, if you compare Ansby to Blackbury, and also Blackbury to Ansby, shouldn't these two be essentially the same except that they are each other's mirror images? That's what the log gives you. I meant the amplitude of the idealized "waves" as determined by the optimal fit. For the selection, I'd discard the statistically non-significant pairs and order the rest by amplitude. I expect that after the initial culling very few significant pairs if any will be left; that is why I am skeptical. --Lambiam Talk 10:49, 19 August 2006 (UTC)

Thanks. But I don't understand why log(A/B) would be equal to log(B/A) anymore than A/B would be equal to B/A. And could you measure the amplitude just by calculating the RMS of the ratio?
 * log(B/A) = – log(A/B), so you get the same graph flipped over the horizontal axis. I don't see why the RMS would give the same results as the amplitude.
 * On second thoughts, you may be better off looking a time-lagged correlations, looking for some time D (for delay) such that the (log of) the prices in Blackbury at time t correlate highly withy those of Ansby at time t – D. After all, you don't expect really periodic cycles like the sunspot cycle, do you? And perhaps you do not so much want to correlate the prices themselves, but the trends. Ah, the possible variations are endless. --Lambiam Talk 19:30, 19 August 2006 (UTC)


 * I believe he suggested working with logarithms because logarithms turn exponential growth into linear growth. Evidentally he expects housing costs or whatever this is to be exponential. I would think there's an exponential inflation component, maybe, but the oscillation part? I wouldn't presume... but it's often good to take a look at both graphs. - Rainwarrior 22:44, 19 August 2006 (UTC)

Thanks again. I was interested in considering the ratios because, firstly, when you've made money from speculation in property (UK) or real estate (US) then there isnt much else to do with it apart from buying a bigger house, often in a nicer area. Looked at it that way, the important thing is not the absolute rise in prices, but changes in the ratio of prices from where you are to where you want to move to.

Secondly, my guess is that an ARMA forecast of such a ratio may be more reliable than ARMA forecasts of the market in two seperate cities, since aspects of the market that apply to both cities will cancel out. My guess is that the ratio would have less variance than just the price in either city.

Thirdly, you could in theory make a lot more money by moving between two places than just staying in one place, as you could benefit from the best price rises in each city when the other city's prices are rising less.

Due to inflation in the UK being much lower now at around 2 1/2 % per year compared to the 25% of the 1970's, then I'm not sure that plain exponential growth will be as powerful a consideration as it was in the past.

I have looked at time lags between London and different parts of the UK. They suggest that it could be the case that price rises start in London and spread out like a ripple in a pond to other parts of the UK, with the lag between London and northern england being about two or three years.

Every few years there are emotive reports in the UK press about how rising prices in the south of England mean that people from the North cannot afford to move down here, but I think this is mostly due to a cycle in the ratios of prices arising from the lag of property price rises in different areas rather much of a pernament change. When prices are stable or falling slightly in London they always seem to be still rising in the north. I do not know if the same kind of thing happens in the US or other countries.

What would be thrilling would be to 'surf' the wave that (may) spread out from London, moving up Britain from London to John O'Groats in Scotland so that you sold when prices had already risen where you were, and you bought somewhere where prices were about to rise. Thus you could experience the price-rise-wave (if it does actually exist) several times in each market cycle rather than just once.

I am interested in seeing price changes in the housing market as being like a spatial wave moving through a medium rather than just something that happens at points, but my understanding of the maths of this is currently very limited. Price rises in one area have a knock-on effect in adjacent areas, as people living in one area where prices have risen buy in an adjacent area with cheaper prices, causing prices in that area to rise also; and similarly with any price falls.

I do wonder how this process could be modelled mathematically - I wonder if there is any physical process that would be analogous, perhaps with the energy of individual molecules in a homogenous medium being analogous to price, such as sound moving through still air, or heat from a point-source in a thin sheet? Or like diffusion? Or perhaps it has a lot in common with Mathematical modelling in epidemiology? Does anyone have any thoughts about what what may be the most suitable model or physical analogy please? Thanks very much.


 * Some models, like that for weather are destined to be chaotic (and thus aren't predictable in the long term). There are things like the Lorenz attractor, which while flipping between two usual positions, is not an oscillation because its timing is unpredictable. I don't know much about housing prices, but I suspect there is more going on than a simple oscillations... there is probably some sort of oscillating component with a period of one year, as there is probably a seasonal change in the houses people sell, but other than that, I wouldn't know. - Rainwarrior 16:31, 20 August 2006 (UTC)


 * As another comment, anything can be modelled - but you have to be judicious about which aspect of the housing market you really want to capture. The model may give precise answers, but if it is not created in a way to capture all the fundamentals, the model would not be useful. Some modellers like to approach this problem from a diffusion processes and stochastic processes point of view. --HappyCamper 04:55, 21 August 2006 (UTC)