1 Introduction
The tracking of the stochastic behavior of a partial sum process is an important problem with many applications. In general, calculations of the probabilistic properties of such a partial sum process require an ability to compute high-dimensional multivariate probabilities of partial sum variables. Computing these multivariate probabilities is in fact a high-dimensional integration problem which in general cannot be performed efficiently by any numerical method presently available.
Computing the multivariate probability of an event in high dimensions, in its most general form, is an intractable problem. An efficient solution may possibly be devised by exploiting any special structures of the problem under consideration. For example, with a general high dimensional density function, if the event is a convex set, a Markov chain Monte Carlo approach can be devised to efficiently approximate the probability of the event (Smith (1984), Belisle et al. (1993), Lovász (1999) and Kiatsupaibul et.al. (2011)). On the other hand, if the probability distribution is a multivariate standard normal or
-distribution with some special correlation structure, an efficient numerical integration may be constructed to compute a rectangular event, say (Dunnett & Sobel (1955), Soong & Hsu (1997)), or an event based on a complete ordering (Kiatsupaibul et al.(2017)).The partial sums of independent random variables have a nice structure that can be exploited to devise an efficient numerical algorithm for the calculation of their probabilistic properties. The objective of this paper is to illustrate how such probability calculations for the stochastic behavior of a partial sum process of independent variables can be performed efficiently based upon the adoption of recursive numerical integration techniques.
The specific problem considered in this paper can be described as follows. Let , be independent random variables. In general, we consider probabilities of the form
(1) |
for sets , . The methodologies discussed in this paper are applicable to the evaulation of this general expression.
However, a special and important case of equation (1) is the sole consideration of the sum of the random variables
(2) |
for a set which has many varied applications. When the sum of the random variables does not have an identifiable distribution, the evaluation of this probability is ostensibly challenging, although it is shown in this paper how its evaluation is in fact straightforward for any value of .
More generally, probabilities concerning the stochastic behavior of the partial sum process of the random variables of the form
(3) |
for sets , , are also a special case of equation (1). In this paper it is also shown how the evaluation of this expression is in fact also straightforward for any value of .
The key result of this paper is that the -dimensional integral expression
(4) |
can be evaluated recursively as a series of -dimensional integral calculations when the set is defined by the conditions
for . This is an application of the general discussion of recursive integration given in Hayter (2006) with . Recursive computational techniques similar to the ones developed in this paper have been applied to the problem of confidence band construction for a distribution function in Kiatsupaibul & Hayter (2015), and to ranked constrained computations in Kiatsupaibul et al. (2017).
Of course, the probability in equation (1
) can be put in this form for continuous random variables with the sets
equal to the sets and the functionsequal to the probability density functions
. In addition, if the random variables have discrete distributions then the results of this paper are still valid with the integrals replaced by sums and the probability density functions replaced by the probability mass functions (see Hayter (2014), for example).General discussions of stochastic control can be found in Wendell & Rishel (1975) and Øksendal (2014), for example. Moreover, in finance the problem of option pricing is also considered a stochastic control problem. Fusai & Meucci (2008) discuss pricing discretely monitored Asian options, and recursive integration techniques in pricing barrier options have been discussed in Aitsahlia & Lai (1997), Sullivan (2000), Andricopoulos et al. (2003) and Fusai & Recchioni (2007).
The results obtained in this paper can also be used to calculate conditional probabilistic expressions and moments for the stochastic behavior of these partial sum processes. For example, probabilities for the independent random variables conditioned on an event can also be tractable since
(5) |
where the numerator is tractable for certain sets . In particular, if the set can also be defined in terms of the partial sums as
for , then both the numerator and denominator of equation (5) are of the form of equation (4) with the sets equal to the sets or and the functions equal to the probability density functions .
Furthermore, it can be noted that the moments and covariances of the independent random variables conditioned on an event are also tractable since
where is of the form of equation (4) with the sets equal to the sets and the functions equal to .
The layout of this paper is as follows. In section 2 it is shown how the integral in equation (4) can be evaluated recursively as a series of -dimensional integral calculations. Recursive formulas are given for the general case, and also for the special case of equation (2). In section 3 a discussion is provided of the implementation details of the methodology. The adoption of Fast Fourier Transforms is illustrated as a way to improve the computational efficiency of the methodology, and an error analysis of the numerical integrations is provided. Some illustrations of the implementation of the methodology are provided in section 4, with examples in the fields of reliability, product quality assessment, and stochastic control. Finally, a summary is provided in section 5.
2 Recursive Integration Methodology
In this section the recursive integration of the integral in equation (4) is discussed. First a change of variables is used to put the expression into a more convenient form, and then the general recursive formulas are provided. The special case of equation (2) is then considered separately. It should be remembered that if the random variables have discrete distributions, then the results of this section are still applicable with the integrals replaced by sums, and the probability density functions replaced by the probability mass functions (see Hayter (2014), for example).
2.1 Change of Variables
If the change of variables , , is employed, then equation (4) becomes
(6) |
where the set is defined by the conditions
for , and where the set is derived from the set through the relationship
Notice that in equation (6) the integrand is the product of terms that only involve two adjacent , while the integration region is defined by conditions on only three adjacent . Consequently, equation (6) is of the form given in section 1 of Hayter (2006) with , which implies that it can be evaluated recursively by a series of 2-dimensional integral calculations. Specific formulas for this recursive integration are now provided.
2.2 General Recursive Formulas
Let
We assume that can always be represented by a finite union of disjoint closed intervals, so that
(7) |
In addition, let
and
To compute equation (6), at each first evaluate
(8) |
for all , and then compute
(9) |
Next, for , at each , and for at each , evaluate
(10) |
for all , and letting for but . Then compute
(11) |
Finally, the evaluation of equation (6), and hence of equation (4), is obtained as
(12) |
Notice that the steps in this evaluation each have the computational intensity of a two-dimensional numerical integration.
2.3 Recursive Formulas for the Sum of Independent Random Variables
Now consider the special case where the are independent random variables with probability density functions , respectively. Recursive formulas are now provided for evaluating some probabilistic properties of . First, notice that it follows from equation (6) that
(13) |
This expression can be computed simply by first evaluating
at each . Then, sequentially, for , evaluate
at each . Again, notice that the steps in this evaluation each have the computational intensity of a two-dimensional numerical integration. Finally, the required expression is obtained as
To compute the expectation of conditional on , or , first evaluate
Then, sequentially, for , evaluate
for each . The expectation of conditional on can then be obtained as
while the expectation of conditional on can be obtained as
Notice that expectations for can be obtained from these expressions by reordering the indices of the .
To compute the expectation of conditional on , or , first evaluate
Then, sequentially, for , evaluate
for each . The expectation of conditional on can then be obtained as
while the expectation of conditional on can be obtained as
Again, expectations for can be obtained from these expressions by reordering the indices of the .
Finally, notice that the expectation of conditional on either or is
which becomes
when the are identically distributed.
3 Implementation details
In this section a discussion is provided of the implementation details of the methodology. The adoption of Fast Fourier Transforms (see Carverhill & Clewlow (1990), for example) is illustrated as a way to improve the computational efficiency of the methodology, and an error analysis of the numerical integrations is provided.
With variables a direct implementation of the methodology requires a calculation with a computational intensity that is equivalent to a sequence of two-dimensional numerical integrations. This is already efficient considering that the original problem is ostensibly an -dimensional numerical integration. However, in the case when the limits of integration in section 2.2 are invariant over pairs ,the computation can be accelerated even further using a Fast Fourier Transform convolution.
3.1 Fast Fourier Transform Convolution
It can be observed that the recursive integration formulas given in section 2 involve the convolution of two functions. Consequently, in some cases the speed of the computation can be increased with a Fast Fourier Transform technique (FFT). As the well-known Convolution Theorem states (see, for example, Smith (2007)), a convolution with respect to the variable in the original domain is equivalent to multiplication with respect to the variable in the transformed domain.
More formally, letting denote the Discrete Fourier Transform (DFT) and its inverse, convolutions between two functions and can be computed as
The functions are decomposed into the transformed domain using the DFT, multiplied in the transformed domain, and then transformed back into the original domain using the inverse DFT.
Notice that the DFT and its inverse can be calculated by the FFT algorithm. Using a grid size of , the overall computational intensity of conducting the convolution in this way using the FFT is (see, for example, Smith (2007)), which is lower than the computational intensity obtained with the direct computation of the convolution in the time domain. The comparative accuracies and efficiencies of the two methods are now demonstrated.
3.2 Accuracy and Efficiency
In order to illustrate and compare the accuracies and efficiencies of the implementations of the recursive integration formula introduced in section 2.2
, the formula is applied to the calculation of the cumulative distribution function, the conditional cumulative distribution function, and the conditional expectation of the sum of 10 independent identically distributed exponential random variables with parameter
= 1. In this case the sum of these random variables has a known gamma distribution, so that the exact values of the calculated quantities are known.
The formulas in section 2.2 are implemented with a truncation of the support at 30. Table 1 shows the computed values and the errors of the required quantities, together with their computational times, obtained from implementations with the direct convolution and the FFT convolution. Different grid sizes are used, and both methods are implemented with SciPy’s Python library (see Jones et al. (2001)) with an Intel Core i5 CPU.
Direct Convolution | FFT Convolution | ||||||
Grid size | Value | Error | Time (sec) | Value | Error | Time (sec) | |
0.01 | 0.24275 | 0.00036 | 0.030 | 0.24275 | 0.00036 | 0.017 | |
0.52945 | 0.00013 | 0.028 | 0.52945 | 0.00013 | 0.017 | ||
1.27289 | 0.00032 | 0.055 | 1.27289 | 0.00032 | 0.033 | ||
0.001 | 0.24239 | 0.00000 | 2.376 | 0.24239 | 0.00000 | 0.098 | |
0.52932 | 0.00000 | 2.342 | 0.52932 | 0.00000 | 0.092 | ||
1.27320 | 0.00001 | 4.719 | 1.27320 | 0.00001 | 0.185 | ||
0.0001 | 0.24240 | 0.00000 | 388.769 | 0.24240 | 0.00000 | 1.235 | |
0.52932 | 0.00000 | 408.467 | 0.52932 | 0.00000 | 1.191 | ||
1.27320 | 0.00001 | 838.920 | 1.27320 | 0.00001 | 2.285 |
It can be seen from Table 1 that the two implementations have similar errors, but the implementation with the FFT convolution is significantly faster. Consequently, it is useful to apply the FFT technique to the evaluation of the recursive formulas given in section 2.2 when the limits of integration are invariant over pairs .
4 Examples and Illustrations
In this section the methodology presented in this paper is illustrated through applications to problems in the fields of reliability, product quality assessment, and stochastic control that require probability calculations for partial sums of independent random variables. The first example concerns a reliability problem where failed components are successively replaced with new components, while the second example concerns a product quality assessment problem where batches are evaluated based on a measurement of the sum of their individual items. Finally, the third problem concerns discrete time stochastic control.
4.1 Reliability Example
Suppose that a machine contains “identical” components which are deployed successively. Thus, the first component is deployed until it fails, whereupon the second component is deployed, and so on. The machine operates until the th component has failed. Furthermore, suppose that an observer can tell whether or not the machine is operating, but not how many components have failed if the machine is still operating.
If the component lifetimes are taken to be independent with specified distributions, then the methodology presented in this paper can be used to investigate the probabilistic properties of the lifetime of the machine. Some illustrative calculations are provided when the component lifetimes are taken to be independent identically distributed Weibull distributions. Without the methodologies presented here, calculations on the sum of Weibull distributions are generally intractable and would usually be assessed with simulations.
The following are examples of the kinds of probability calculations that can be performed using the recursive integration methodology presented in this paper. If the component lifetimes are with distributions , so that the machine lifetime is , then an obvious quantity of interest is the machine survival function
If the machine is observed at time , then if the machine is still operating the conditional survival function is
If the machine has failed at time then the conditional survival function is
The expected failure time of the machine is simply times the individual expected component failure time, but if the machine is observed to be still operating at time , then the conditional expected failure time is
where is the conditional distribution of the failure time and
This can be evaluated as the sum of
separate integrals which are identical if the component lifetimes are identically distributed. The variance of the conditional failure time can be obtained by having
in place of in the integrand, so that can be found from terms with and in the integrand.Finally, if the machine is observed to be still operating at time , then the distribution of the number of failed components at time can be obtained, for , as
Table 2 shows the computed results (with computation times using the Fast Fourier Transform technique) of these probabilities when
are independent, identically distributed Weibull random variables with shape parameter equal to 2 and scale parameter equal to 1. These random variables have an expectation of 0.886 and a standard deviation of 0.463.
Computed value | Computational time (sec) | |
^{†} the exact value is equal to |
4.2 Product Quality Example
Consider a product quality assessment problem where a measureable property of an item is satisfactory if it is no smaller than a specified level . Let , , represent the values of these properties for a batch of items, and suppose that they can be modelled as being independent with an identical probability density function .
Suppose that instead of the costly approach of testing each item in the batch, it is possible and simple to obtain information about the sum . This is the case, say, if the weight of the item is of interest or the radiation emitted from the item. It is useful to be able to make probability statements about the number of satisfactory items in the batch based upon the information obtained about . In practice, the exact value of may be observed, or a lower or an upper bound may be obtained.
If the exact value of is observed then
where
and
As an illustration, some calculations are shown when , and
is taken to be a Laplace (double exponential) distribution with parameter
, so thatTable 3 shows the computed values of at different and . The computational time of each entry using the Fast Fourier Transform technique was about 0.3 seconds.
If the bounds or are observed rather than the exact value of , then the expressions for and can be modified so that the integration regions depend on the conditions or . In either case and can be again be evaluated using the recursive integration methodologies presented in this paper.
i | 0 | 5 | 10 | 15 | 20 |
---|---|---|---|---|---|
0 | 0.0774 | 0.0004 | 0.0000 | 0.0000 | 0.0000 |
1 | 0.3629 | 0.0518 | 0.0024 | 0.0002 | 0.0000 |
2 | 0.3896 | 0.2960 | 0.0477 | 0.0076 | 0.0016 |
3 | 0.1461 | 0.4176 | 0.2315 | 0.0688 | 0.0213 |
4 | 0.0225 | 0.1971 | 0.3905 | 0.2374 | 0.1135 |
5 | 0.0015 | 0.0347 | 0.2560 | 0.3568 | 0.2771 |
6 | 0.0000 | 0.0023 | 0.0656 | 0.2443 | 0.3310 |
7 | 0.0000 | 0.0001 | 0.0061 | 0.0751 | 0.1948 |
8 | 0.0000 | 0.0000 | 0.0002 | 0.0094 | 0.0542 |
9 | 0.0000 | 0.0000 | 0.0000 | 0.0004 | 0.0063 |
10 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0002 |
4.3 Discrete Time Stochastic Control Example.
This section illustrates the application of the methodology developed in this paper to a discrete time stochastic control problem. Let , , be the performance measurement of a process at discrete times , where the are non-negative and assumed to be independent and identically distributed when the process is operating correctly. The objective is to dynamically track the partial means of the over time, and to detect any increase in the mean of the by a certain decision rule.
For , denote the partial means up to by
Suppose that for each , the process is stopped when both and are greater than , for a certain control limit . If the process is not stopped prior to , then the process is deemed to have been operating correctly throughout the time horizon . For a specified distribution of the , it is required to calculate the value of that provides a probability of of not incorrectly stopping the process within the horizon .
The control limit can be obtained by searching for the value of that is the solution to the equation
(14) |
The event in equation (14) is the event that the process is not terminated within the time horizon. This event is in the form of equation (1), which can be computed by the formula in equation (6).
In order to compute equation (6), the in equation(7) have and as the transformed variables
Furthermore, given and , the process is in control at time if
or
In addition, since the are non-negative random variables it follows that
Therefore,
where
and
Notice that in this case the Fast Fourier Transform technique cannot be used because the limits of the integrals and vary over and .
To obtain the required control limit , the probability in equation (14) has to be computed at several values of in order to search for the solution. Consequently, for a large time horizon it is essential that an efficient computation methodology, as developed in this paper, is available in order to obtain in practice.
Table 4 shows the control limit for different values of and , together with computational times using the recursive integration methodology developed in this paper, for the case where the are independent, identically distributed exponential random variables with scale parameter equal to 1.
8 | Time (sec) | 10 | Time (sec) | 12 | Time (sec) | |
---|---|---|---|---|---|---|
0.10 | 1.96 | 2300 | 2.28 | 2402 | 2.55 | 3980 |
0.05 | 2.65 | 1964 | 3.08 | 2339 | 3.47 | 2804 |
5 Summary
The tracking of the stochastic behavior of a partial sum process is an important problem. There are many applications of partial sum processes, and in this paper examples have been provided in the fields of reliability, product quality assessment, and stochastic control.
It has been shown how calculations of the probabilistic properties of such a partial sum process, which ostensibly require an ability to compute high-dimensional multivariate probabilities, and so are consequently intractable in general, can in fact be solved as a sequence of two dimensional computations, with each computation being the convolution of two functions.
Finally, it has been shown how the Fast Fourier Transform technique can be utilized for the evaluation of these convolutions in some cases. The results of this paper allow the efficient computation of the probabilistic properties of many important partial sum processes.
References
Aitsahlia, F. and Lai, T. L., 1997. “Valuation of discrete barrier and hindsight options,” The Journal of Financial Engineering, 6 (2), 169-177.
Andricopoulos, A.D., Widdicks, M., Duck, P.W. and Newton, D.P., 2003. “Universal option valuation using quadrature methods,” Journal of Financial Economics, 67, 447-471.
Belisle, C. J. P., Romeijn, H. E. and Smith, R.L., 1993. “Hit-and-run algorithm for generating multivariate distribution,” Mathematics of Operations Research, 18, 255-266.
Carverhill, A.P. and Clewlow, L.J., 1990. “Flexible convolution”, Risk, 3, 25- 29.
Dunnett, C. W. and Sobel, M., 1955. “Approximations to the probability integral and certain percentage points of a multivariate analogue of Student’s -distribution,” Biometrika, 42, 258-260.
Fleming, W. H. and Rishel, R. W., 1975. “ Deterministic and Stochastic Optimal Control,” Springer, New York.
Fusai, G. and Meucci, A., 2008. “Pricing discretely monitored Asian options under Levy processes,” Journal of Banking and Finance, 32, 2076-2088.
Fusai, G. and Recchioni, M.C., 2007. “Analysis of quadrature methods for pricing discrete barrier options,” Journal of Economic Dynamics and Control, 31 (3), 826-860.
Hayter, A. J., 2006. “Recursive integration methodologies with statistical applications,” Journal of Statistical Planning and Inference, 136, 2284-2296.
Hayter, A. J., 2014. “Recursive formulas for multinomial probabilities with applications,” Computational Statistics, 29 (5), 1207-1219.
Jones E., Oliphant E., Peterson P., et al., 2001. “SciPy: Open Source Scientific Tools for Python,” http://www.scipy.org/.
Kiatsupaibul, S., Hayter, A. J. and Wei, L., 2017. “Rank constrained distribution and moment computations,” Computational Statistics and Data Analysis, 105, 229-242.
Kiatsupaibul, S. and Hayter, A. J., 2015. “Recursive confidence band construction for an unknown distribution function,” Biometrical Journal, 57 (1), 39-51.
Kiatsupaibul, S., Smith, R. L. and Zabinsky, Z. B., 2011. “An analysis of a variation of hit-and-run for uniform sampling from general region,” ACM Transactions on Modeling and Computer Simulation, 21 (3), Article 16.
Lovász, L., 1999. “Hit-and-run mixes fast,” Mathematical Programming, 86, 443-461.
Øksendal, B., 2014. “Stochastic Differential Equations”, 6th Edition, Springer, Heidelberg.
Smith, J. O., 2007. “Mathematics of the Discrete Fourier Transform (DFT), with Audio Applications”, Second Edition, W3K Publishing.
Smith, R. L., 1984. “Efficient Monte Carlo procedures for generating points uniformly distributed over bounded regions,”
Operations Research, 32, 1296-1308.Soong, W. C., and Hsu, J. C., 1997. “Using complex integration to compute multivariate normal probabilities,” Journal of Computational and Graphical Statistics, 6 (4), 397-415.
Sullivan, M. A., 2000. “Pricing discretely monitored barrier options”, Journal of Computational Finance, 3 (4), 35-52.
Comments
There are no comments yet.