Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I have a set of data, $y$ and $x$. I would like to test the following hypothesis: There is a peak in $y$; that is as $x$ increases, $y$ first increases and then decreases.

My first idea was fitting $x$ and $x^2$ in a SLR. That is, if I find that the coefficient before $x$ is significantly positive and the coefficient before $x^2$ is significantly negative, then I have support for the hypothesis. However, this only checks for one type of relationship (quadratic) and may not necessarily capture the existence of the peak.

Then I thought of finding $b$, such a region of (sorted values of) $x$, that $b$ is between $a$ and $c$, two other regions of $x$ that contain at least as many points as $b$, and that $\bar{y_b}>\bar{y_a}$ and $\bar{y_b}>\bar{y_c}$ significantly. If the hypothesis is true, we should expect many such regions $b$. Thus, if the number of $b$ is sufficiently large, there should be support for the hypothesis.

Do you think I am on the right track to find a suitable test for my hypothesis? Or am I inventing the wheel and there is an established method for this problem? I will greatly appreciate your input.

UPDATE. My dependent variable $y$ is count (non-negative integer).

share|improve this question
    
Does $y$ vary smoothly with $x$? If so you could try fitting a model including a smoother (say a GAM) and then compute first derivatives of the fitted smoother and their confidence interval. If the derivative is signif increasing then signif decreasing you have an answer. –  Gavin Simpson Jul 31 '12 at 13:34
add comment

2 Answers 2

I was thinking of the smoothing idea also. But there is a whole area called response surface methodology that searches for peaks in noisy data (it does primarily involve using local quadratic fits to the data) and there was a famous paper I recall with "Bump hunting" in the title. Here are some links to books on response surface methodology. Ray Myer's books are particularly well-written. I will try to find the bump hunting paper.

Response Surface Methodology: Process and Product Optimization Using Designed Experiments

Response Surface Methodology And Related Topics

Response surface methodology

Empirical Model-Building and Response Surfaces

Although not the article I was looking for, here is a very relevant article by Jerry Friedman and Nick Fisher that deals with these ideas applied to high-dimensional data.

Here is an article with some online comments.

So I hope you at least appreciate my response. I think your ideas are good and on the right track but yes I do think you might be reinventing the wheel and I hope you and others will look at these excellent references.

share|improve this answer
3  
I wasn't among the downvoters, but Answers on SE sites are expected to be more than a link to content. Summarising the content or providing a summary response then linking to content for further details would be better. –  Gavin Simpson Jul 31 '12 at 14:19
2  
I'm upvoting this one because (1) it presents a good idea; (2) it does have some commentary; and (3) it is supported with some carefully chosen links, including to freely available material. Yes, it looks typographically bad, because the links could be more nicely formatted: but I hope people aren't weighing that aspect of answers heavily in their voting decisions! –  whuber Jul 31 '12 at 14:22
1  
@whuber I agree after being able to read it clearly due to the nice formatting by Procastinator. +1 as well. I think there is enough summary here and some topics are almost too complex for anything more than the fundamental idea and a reference for further reading. –  Erik Jul 31 '12 at 14:31
5  
@MichaelChernick Note that wasn't a criticism from me, just offering a reason why people might have down voted. I would disagree with them if that was the reason because I think your answer is spot on, especially with PRIM; I was just consulting my Hastie et al (2009) as to what it said on PRIM. You might want to add that link to the Answer as there are two sections on PRIM there and the PDF is available for free. –  Gavin Simpson Jul 31 '12 at 14:42
1  
@Nikita What is the formal statistical hypothesis that you want to test? First you have to find the peaks which is a big part of this. Are you testing that the peak is not just a result of noise? I am not sure what literature there is to solve this problem but my thought would be that you could fit a polynomial regression to the data (perhaps a quadratic locally). From that you would have an estimate of the residual variance. The statistical significance of the quadratic term would be a test for significance of the peak. –  Michael Chernick Aug 2 '12 at 13:32
show 11 more comments

Even though you have not answered my question, if my guess is right you are looking for a test of white noise which amounts in the frequency domain to show that spectrum is flat. So Fisher's periodogram test which in this reference is called Fisher's kappa could be used. See the link.

http://www4.stat.ncsu.edu/~dickey/Spain/pdf_Notes/Spectral2.pdf

Bartlett's test is also mentioned in the reference. Now rejecting the null hypothesis amounts to finding a significant peak in the periodogram. This would mean that a periodic component exists in the time series.

Because the test is in the frequency domain and involves periodogram ordinates the ordinate have a chi square 2 distribution under the null hypothesis and are independent. This special distribution comes about only because of the transformation to the frequency domain. If x were time this would not work in the time domain or in general the distribution for the ys would not be independent chi square.

But take the model y=constant independent of x. Use the y$_m$, the mean of the ys as the estimate for the constant. Then testing for the existence of a peak would amount to rejecting that the residuals form a white noise sequence.

share|improve this answer
    
The more I ask on this website, the more I learn =) , this time about white noise tests and about the need for me to give sufficient information in my questions. I am sorry about not answering your question promptly earlier. I think white noise tests for residuals would be suitable when the errors are normally distributed, but my dependent variable $y$ is actually count. So I would not expect to see white noise in residuals in any case. Or am I missing something? –  Nikita Samoylov Aug 4 '12 at 5:08
    
So y is count data and what is x a continuous explanatory variable? My previous suggestions probably don't in that case but there is a lot of recent literature on count models. So if you can be a little more specific about the data and the problem maybe i can point to a solution. –  Michael Chernick Aug 4 '12 at 13:53
    
Yes, $y$ is count, $x$ is continuous (but non-negative). Not sure what other pieces of information would be important. –  Nikita Samoylov Aug 5 '12 at 2:05
    
I am not sure whether or not this will help but Cameron and Trivedi published a book on count regression models and have a second edition coming out in 2013. Here is a link with some information: cameron.econ.ucdavis.edu/racd/count.html –  Michael Chernick Aug 5 '12 at 4:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.