Sunteți pe pagina 1din 6

In probability theory, a martingale is a model of a fair game where knowledge of past events never helps predict the mean

of the future winnings. In particular, a martingale is a sequence of random variables(i.e., a stochastic process) for which, at a particular time in the realizedsequence, the expectation of the next value in the sequence is equal to the present observed value even given knowledge of all prior observed values at a current time. To contrast, in a process that is not a martingale, it may still be the case that the expected value of the process at one time is equal to the expected value of the process at the next time. However, knowledge of the prior outcomes (e.g., all prior cards drawn from a card deck) may be able to reduce the uncertainty of future outcomes. Thus, the expected value of the next outcome given knowledge of the present and all prior outcomes may be higher than the current outcome if a winning strategy is used. Martingales exclude the possibility of winning strategies based on game history, and thus they are a model of fair games. ttached below is a workbook that contains the following VBA functions related to the normal distribution and its inverse, as well as the bivariate normal distribution: Normal Distribution func_normsdist: the standard normal distribution function func_normsdistdd: a more precise, but slower version of the standard normal distribution function func_normsinv: the inverse standard normal distribution function (quantile function)

func_normsinvdd: a more precise, but slower version of the inverse standard normal distribution function func_normsdense: the standard normal probability density function Bivariate Normal Distribution func_binormcum: the bivariate normal distribution function func_binormcumdd: a more precise, but slower version of the bivariate normal distribution function Log-Normal Distribution func_logdist: lognormal distribution function func_logdistdd: a more precise, but slower version func_loginv: inverse lognormal distribution function (quantile function) func_loginvdd: a more precise, but slower version func_logdense: the lognormal probability density function While the bivariate normal distribution function is an addition to the functionality available in EXCEL, one might ask why bother with the other functions, as they are implemented as worksheet functions in EXCEL. There are several reasons: You might use VBA with ACCESS, not EXCEL, in which case the worksheet functions are not available You might use an older version of EXCEL, in which case you might not be satisfied with the accuracy of the worksheet-functions (see e.g. here ) You might require high speed, because you are calling the inverse normal distribution function many many

times from within VBA, for instance during a Monte Carlo simulation. This last point related to speed has been extreme in older versions of excel, but still is very valid with EXCEL 2010 we have gone from roughly a factor of 60 to a factor of 7, still enough to feel the difference, e.g. when a credit portfolio simulation model based on the Merton model is run, where more than half of the computation time is taken up by calls to the inverse normal distribution. I should say that I cannot claim that I have invented any of the algorithms used, I didnt even do the translation to VBA for one of them (see the actual VBA code for credits where credits are due) but I find the collection here very useful, at least I would have liked having it, when I started using normal distributions in VBA. Attached below is a workbook with all the described VBA functions. No warranty whatsoever is accepted, you are using this entirely at your own risk: Normal_distribution_v2 While the plot of a cumulative distribution often has an Slike shape, an alternative illustration is the folded cumulative distribution or mountain plot, which folds the top half of the graph over,[2][3] thus using two scales, one for the upslope and another for the downslope. This form of illustration emphasises the median and dispersion(the mean absolute deviation from the median[4]) of the distribution or of the empirical results.

Inverse distribution function (quantile function)[edit] If the CDF F is strictly increasing and continuous then is the unique real number such that . In such a case, this defines theinverse distribution function or quantile function. Unfortunately, the distribution does not, in general, have an inverse. One may define, for , the generalized inverse distribution function:

Example 1: The median is . Example 2: Put . Then we call the 95th percentile. The inverse of the cdf is called the quantile function. The inverse of the cdf can be used to translate results obtained for the uniform distribution to other distributions. Some useful properties of the inverse cdf are: 1. is nondecreasing 2. 3. 4. if and only if 5. If has a distribution then is distributed as . This is used in random number generation using the inverse transform samplingmethod. 6. If is a collection of independent -distributed random variables defined on the same sample space, then there exist random variables such

that is distributed as probability 1 for all . Multivariate case[edit]

and

with

When dealing simultaneously with more than one random variable the joint cumulative distribution function can also be defined. For example, for a pair of random variables X,Y, the joint CDF is given by where the right-hand side represents the probability that the random variable X takes on a value less than or equal to x and that Y takes on a value less than or equal to y. Every multivariate CDF is: 1. Monotonically non-decreasing for each of its variables 2. Right-continuous for each of its variables. 3. 4. and Use in statistical analysis[edit] The concept of the cumulative distribution function makes an explicit appearance in statistical analysis in two (similar) ways. Cumulative frequency analysis is the analysis of the frequency of occurrence of values of a phenomenon less than a reference value. The empirical distribution function is a formal direct estimate of the cumulative distribution function for which simple statistical properties can be derived and

which can form the basis of various statistical hypothesis tests. Such tests can assess whether there is evidence against a sample of data having arisen from a given distribution, or evidence against two samples of data having arisen from the same (unknown) population distribution. KolmogorovSmirnov and Kuiper's tests[edit] The KolmogorovSmirnov test is based on cumulative distribution functions and can be used to test to see whether two empirical distributions are different or whether an empirical distribution is different from an ideal distribution. The closely related Kuiper's test is useful if the domain of the distribution is cyclic as in day of the week. For instance Kuiper's test might be used to see if the number of tornadoes varies during the year or if sales of a product vary by day of the week or day of the month.

S-ar putea să vă placă și