# Generate series of data with similar average, variance, autocorrelation and “spikyness”

Context: I have a couple of series of data, stock index data. I translate those distributions into two input stream for a videogame, and let the input compete. One of the two is definitively more efficient than the other (more than 50% more), and I wanted to prove or disprove that the most efficient series is due to it's spikyness (being the winner more spiky). With spiky I mean the opposite of smooth: I don't know the statistical term for this qualifier, but it probably is affected by the difference between a point and the near points (since a smooth line has no big difference between near values)

My objective: Generate a series similar (meaning: same average, std deviation, and autocorrelation) to an already existent series, with fixed range [0, 1].

In particular, one of my original series is the following: Average: 0,3454

Standard Deviation: 0,1831

Auto-correlation: 0,02306

Bounds: [0,1]

To generate a randomized series that shares these values, these are my steps:

1. I generate a linear series with given average. (Purple line, gr 2)
2. I generate, every 50 elements, a random variation from that curve. I vary from a random number between -0,2 and 0,2, that is a completely arbitrary number, chosen by trial and error. (Blue line, gr 2)
3. Same procedure, but every element and with a step of -0,021 and 0,021. (Final result, as shown in the first graph, gr 3)

Average: 0,3572 (Similar enough)

Standard Deviation: 0,2351 (A bit off)

Auto-correlation: 0,02314 (Pretty good)

Bounds: [0, 0,8175] (A bit off)

I am not completely satisfied with the result. The values are there and they are similar enough, but the shapes of the two series are different for my purpose: my generated series seems to change more prominently "point-by-point", and it definitely looks more spiky. Is this the best method to achieve the result? Is autocorrelation a good qualifier for "spikyness"?

Note on the autocorrelation: I am using Excel for calculation, generation and plotting, and what I calculate is the derivative point by point of the original distribution, and the Standard Deviation of the newly-obtained distribution is the auto-correlation. Is it the right/fastest way to proceed?

• You say that you have a certain "purpose". What is it? – Andreas Dzemski Mar 6 '18 at 16:04
• I added the context to the question. Context: I have a couple of distributions, stock index data. I translate those distributions into two input stream for a videogame, and let the input compete. One of the two is definitively more efficient than the other (more than 50% more), and I wanted to prove or disprove that the most efficient distribution is due to it's spikyness (being the winner more spiky). – Simone Chelo Mar 6 '18 at 16:45
• It is hard to understand exactly what you mean by spiky and jaggy. Is it point to point variation or is it a distribution of feature frequencies that matter? Without a clearer understanding my intuitive answer is to explore either Markov chains (random walks) or Fourier transforms (which can generate features over a distribution of frequencies). – ReneBt Mar 16 '18 at 11:18
• This question is incomprehensible because the plots are not "distributions" in any standard sense of the word. I will refund your bounty so you have time to clarify the question; otherwise I'm concerned you will have wasted your reputation for nothing. – whuber Mar 16 '18 at 14:27
• @ReneBt, defining "spiky" is exactly what the question is about. What i mean is that is the opposite of smooth, and i suppose a good qualifier of that takes into account the difference point-by-point. I guessed autocorrelation, but the result is that two series with same autocorrelation are "visibly" different, the second one being a lot less smooth. – Simone Chelo Mar 17 '18 at 16:31