attempting to predict a skewed random stream
jonathan and i were talking about predicting a stream of random numbers last night. the first column is the input random stream - integers in [1, 10]. the second attempts to guess the next value in the stream by always guessing the previous value. (starts w/ min. value) the third attempts to guess the next value in the stream by always guessing the min. value. the fourth attempts to guess the next value in the stream by guessing randomly. at the bottom are shown the average value of the input stream, and the number and percentage of correct guesses for each approach. if the input stream is uniformly distributed, all three approaches are equivelant, but if the stream is skewed by making one end of the range more likely, then: guessing the previous value is a clear win, guessing the same number all the time is a risky manuever, and guessing randomly is the same as guessing against a uniform distribution. good old random. orion elenzil 201107 |