simulating daily temperatures
Given some historical high, low, and mean temperatures for a certain month of the year, how could a full month of temperatures be somewhat realistically simulated? The recipe among the few that were tried that produced the best results turned out to be this:
- Obtain simulated high, low and mean temperatures within the bounds suggested by the empirical data.
- Assign the high and low temperatures to two random days in the month.
- Assign a random temperature between the high and the low to the first and last days of the month if they haven't yet been assigned a temperature.
- For each remaining day, take the value at the intersection of the line connecting the two anchor temperatures, vary it by some random amount in a random direction between 0 and the value, and assign the result as the temparature for that day.
- transform the resulting values to the desired mean.
A demo that performs this process displays the results using plotchart is here .
- Original author.