Can some help me what really is the formula of the standardized precipitation index and how will it be computed? I am thinking of using the index to classify the 40 years into dry year, average year , or wet year using total annual rainfall data. I understand that SPI is an index based on the probability of recording a given amount of precipitation, and the probabilities are standardized so that an index of zero indicates the median precipitation amount. Does the definition mean that we need first to calculated the probability of rainfall before it will be standardized (by (x value-mean)/ standard deviation)? If yes, how will the probabilities of rainfall be computed? Please help.