<<

WSEAS TRANSACTIONS on Stevan Berber

The Exponential, Gaussian and Uniform Truncated Discrete Density Functions for Discrete Time Systems Analysis

STEVAN BERBER Electrical and Computer Department The University of Auckland Princes Street, 1010 Auckland Central NEW ZEALAND [email protected]

Abstract: - Continuous density functions and their truncated versions are widely used in engineering practice. However, limited work was dedicated to the theoretical analysis and presentation in closed forms of truncated density functions of discrete random variables. The derivations of exponential, uniform and Gaussian discrete and truncated density functions and related moments, as well as their applications in the theory of discrete time stochastic processes and for the modelling of communication systems, is presented in this paper. Some imprecise solutions and common mistakes in the existing books related to discrete time stochastic analysis are presented and rigorous mathematical solutions are offered.

Key-Words: - truncated densities, Gaussian truncated discrete density, exponential truncated density, moments of truncated densities.

1 Introduction density function in the theory of discrete time stochastic processes can be found in published papers and books. For example, in book [1], page 78, example 3.3.1 and book [2], pages 71 and 72, 1.1 Motivation example 2.2.3, the mean and Digital technology is widely used in the function of a discrete time harmonic process, which development and design of electronic devices in is defined as X( m ) A sin( m ) with communication systems. Therefore, the theoretical analysis of these systems assumes representation of uniformly distributed phases in the interval (-π, π) having continuous density function =1/2π, are signals in discrete time domain. Consequently, the f () random variables in these systems need to be calculated as represented in discrete forms having the values in a limited interval. These problems motivated us to  (m ) E { X ( m )}  A sin( m  ) f (  ) d  work on truncated discrete density functions   derivations. Here, we will start with presenting three  (1) cases where this kind of analysis is necessary. A   sin(md  )   0 FIRST CASE: In the analysis of discrete time  2  stochastic processes, we are usually interested in calculating their mean, and autocorrelation and function. For these calculations, we need to use the probability density function of a random variable RX ( m , l ) E { X ( m ) X ( l )} involved. In doing this, a common mistake is that  the density function is defined as a continuous  A2 sin( m  )sin(  l   ) f (  ) d    function of the related random variable, which  (2) implies that the random variable is of a continuous A2  type even though it is not. Therefore, in order to  cos (m l )  sin( ( m  l )  2  ) d  4  preserve mathematical exactness, we need to define  A2 and use density functions of discrete random cos (ml ) variables. The misleading and mathematically 2 incorrect procedures in using continuous probability

E-ISSN: 2224-2880 226 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

However, due to the discrete nature of the stochastic developed the expression of a truncated discrete process X(m) and its realisations, which are discrete exponential function in closed form and time function x(m) of argument m, the presented demonstrated its application for this case. calculations are not mathematically correct. In this THIRD CASE: In direct spread- paper, these expressions will be rigorously (DSSS) and code division multiple access calculated after deriving the proper density function (CDMA) systems with imperfect sequence

f () . Namely, the random phase θ has to be of a synchronisation, the probability of error conditional discrete type inside the interval (-π, π) having a on the delay τ between transmitter and the receiver discrete density function. On the other hand, based spreading , for a single-user system with on existing theory, the density function of the interleavers, can be expressed as discrete phase need to be presented as a mass 1 1/2 function. However, the mass function cannot be 1 4( / 4) 4 2 E P()  erfc XX( )  (1  (  )) b (5) used to directly solve the . Therefore, in this e 2  2   bN0 paper, we derived and used the density functions of  the discrete random variables expressed in terms of 22 Dirac’s functions, which simplified the whereas XS( ) |  | /( |  |) , ψ is the sequence factor, solution of related integrals, as will be shown in S is the number of interpolated samples in a chip, Section 5. 2b2 is the mean square value of fading coefficients, SECOND CASE: The general expression for 2β is the spreading factor and Eb/N0 is the -to- the probability of bit error of a direct sequence noise ratio in the channel. spread-spectrum (DSSS) systems in a wideband The similar phenomenon occurs for well- channel (WBC) with white Gaussian noise, investigated carrier synchronization, where a assuming existence of one primary and a set of random phase difference exists between the received secondary channels, was derived in [3]. It is signal and the locally generated carrier. This random assumed that the signals in secondary channels are phase was usually represented by Gaussian and transmitted with random delays τ in respect to the Tikhonov density function, as can be seen in Lo and relative zero-delay in the primary channel. The Lam [4], Eng and Milstain [5] and Richards paper probability of error can be expressed in this form [3] [6]. As has been pointed out by Richards, Tikhonov distribution can be expressed as Gaussian or 1/2 2 2 2 1 1 ( 1) 1  1  / 2SE  1  1   (3) uniform density function as its special cases. These P()  erfc   b e        densities are used to find the mean value of the 2 1  / 2S    1  / 2S  4  1 / 2SN  0 probability of error that was conditioned on the

phase random variable, as may be seen from papers whereas ψ is the sequence factor, S is the number of of Polprasert and Ritcey [7], Song at al. [8] and interpolated samples in a chip, 2β is the spreading Chandra at al. [9]. In all these papers, the density factor and E /N is the signal-to-noise ratio in the b 0 functions are assumed continuous and the interval of channel. The probability function (3) is a random their values sometimes was beyond the interval of function conditioned on the delay τ as a random possible values of the phase error as explicitly noted variable. Therefore, the probability of error is the in Richards’s paper [6]. mean value of this function that can be calculated Therefore, in theoretical analysis and practice, using this the density function of discrete random variable τ

 has to be expressed using a truncated discrete P P()() f  d  . (4) density function. Furthermore, this function has to e e d t  be expressed in a form suitable to solve the integral (4). For these reasons, in this paper we derived the The probability density function of the random expressions of truncated discrete exponential, delay τ is generally represented by the continuous Gaussian and uniform density functions and expressed them in terms of Dirac’s delta functions exponential density function, fτ(τ). However, in the above case the interval of τ values is limited and and demonstrated their applications. contains S possible discrete values. Therefore, the delay has to be expressed using a truncated discrete density function fdt(τ). Furthermore, this function has 1.2 Background to be expressed in a form suitable to calculate The theory of continuous density functions and their integral (4). To solve all these problems we truncated versions, expressed as conditional density

E-ISSN: 2224-2880 227 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

functions, is well known. The problem of 3) Expression of density functions in closed form: discretisation of Gaussian density function and the By using Dirac’s delta functions the obtained derivation of related discrete density function is density function of discrete random variable can be analysed in detail in Roy’s paper [10] pointing out used to calculate the mean values of a random the importance of that makes function according to the integral (4). key role in stochastic systems modelling, apostrophising that the applied discretisation method approximates the value of probability of 2 The Discrete Truncated Exponential particular event faster than in the case of simulation. Density Function and Its Moments This paper was a good guide for our development in This section contains basic of the density spite of that the notion of the discretisation interval function and related . The obtained results is not preserved and symmetry of the obtained can be used to find mean value of the probability of density function around the mean value is lost. error expressed as (2). Similar analyses for geometric and hypergeometric probability functions was presented in Xekalaki work [11]. Roy and Dasgupta [12] suggested 2.1The discrete exponential density function discrete approximation procedures for the The procedure of a continuous exponential density evaluation of the reliability of complex systems. function discretisation is presented in Fig. 1. The Roy [13] investigated the discrete Rayleigh discretisation is performed at uniformly spaced distribution function with respect to two measures discrete interval T . The problem is how to find the of failure rate, and used this distribution for s expression of this discrete density function and how evaluation reliability of complex systems. In Ho and to find its mean and variance. In our approach, in Cheng’s paper [14], the expression for the the process of discretisation the probability of each probability mass of a truncated exponential density interval needs to be calculated and assigned to the function was derived. However, they did not present discrete time instants nT . There are two possibilities the related density function in closed form and did s in this case: Firstly, the probabilities are assigned to not derive the moment of the density function. the left side of the interval starting with discrete Ahsanullah [15] presented his analysis of value τ=0. Secondly, the probability are assigned to . Some observations on the the right side of the interval starting with discrete exponential half logistic density function and related value τ=1. distribution were presented in Seo and Kang paper

[16]. Raschke [17] pointed out the importance of fd (τ) applying the truncated exponential function in modelling the amplitude of an earthquake in PT{0 } seismology and suggested the use of the generalized s truncated exponential distribution. In this paper, we will use our unique approach to derive the expressions for discrete probability τ density functions, and then extend them for the 0 Ts 2Ts … (n-1)Ts nTs derivations of related truncated density functions that are more suitable in practice when the discrete Figure 1. Discretisation of a continuous exponential random variable exists in a limited interval of its density function. possible values. Specifically, the discrete truncated density These two possibilities will have some functions of our interest need to fulfil these consequences to the expressions for density conditions: 1) Discretisation of the related function, mean and variance of the truncated continuous density functions. The discrete density discrete random variable and particular care should function should be obtained by assigning probability be taken about this issue. Firstly, we will derive the values as the weights of Dirac’s delta functions. 2) discrete density and distribution functions in closed Preservation of the value of discretisation interval Ts forms and related moments. that allows us to reconstruct the sampling interval Proposition: The discrete density function, having and relate it to the real values in practical the values at the uniformly spaced instants Ts, is application. For example, in the case of defining a expressed as delay in communication systems these sampling intervals will be expressed in appropriate time units.

E-ISSN: 2224-2880 228 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

 Tssn T , (6) fds( ) ( e  1) e (   nT ) After calculating n1

  where δ(.) are Dirac’s delta functions and τ is a  n 1 e ee   ()   , continuous variable. The values of the density 11  n0 11ee function are discrete and defined by the positions and weights of delta functions. Proof: If this density is uniformly discretized in the expression for 1 can be found and used in (10) respect to τ, with the interval of discretisation of Ts, to find the mean as expressed by (8). Similarly, the the probability value in any interval defined by n is mean square value can be found as

 nTs 22 P{( n 1) T   nT }  f ( ) d  E{}() fd  d  ss   .   (nT 1) s (11) (n  1) T  n  T  T n T  es  es ( es  1) e s  2 n  (e  1) n  e ( e  1) 2 n1 To express the density in a closed form, these probabilities can be used as weights of Dirac’s delta where the 2 can be calculated as a function of as functions representing the discrete exponential  ee2   2   1   1 . By inserting into (11), we density function at time instants τ = nTs, which results in this expression can get the variance as stated in (9). Proposition: The mean values for the discrete  random variable starting with n = 0 and with n = 1 fd ( ) P {( n  1) Ts   nTs }  (   nTs ) are different as was pointed out before. Their n1 , (7) relationship is expressed as  (eTss  1) en T  ( nT )  s e 1 n1     1. (12) dd0 ee11 which completes our proof. Proposition: The mean and variance derived for any This relation needs to be taken into account, Ts, and for a Ts = 1, can be expressed in especially in the case when the sampling interval Ts these forms is large.

 Ts dd  fd()     1 eTs 2.2 The truncated discrete exponential density   (8) function T eTs e s As we pointed out in Introduction, our motivation in Ts  ee11Ts 1 doing this research is to develop theoretical and expressions for the discrete truncated density eeTs  functions that are appropriate for discrete time 2E{}  2   2   . (9) ddTs 22 stochastic systems modelling. For example, the (ee 1)Ts 1 ( 1) delays in discrete time communication systems are taking values in a limited interval of, say, S possible Proofs: The proofs for the unit discretisation discrete values. Therefore, the function that interval Ts = 1 will be presented. In this case the describes the delay distribution is truncated to mean of discrete density function is interval S.    f()  d    (e  1) en  (   n ) d  Proposition: The density and distribution functions dd  0 n1 of a truncated discrete exponential random variable   (10) are given in closed form as (e  1) e n     (   n ) d  n1  Ts S (e  1)  f () en()  n (e  1) n  en  ( e   1)  dt  S  1 n1 1 e n1 and

E-ISSN: 2224-2880 229 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

  (e  1) n (13) S1 Fdt () S e U() n n1 1 e dt0 (nTs )  f dt (( n  1) Ts ) . (16) n0 0 f (1)  T  T  f (2)...  T   ST  f () ST Proof: In order to find this truncated function, the dt s s dt s s dt s whole domain of possible τ values from 0 to infinity, for the already analysed discrete density When the first density value is defined for n = 1, the function, will be divided into non-overlapping mean value will be intervals containing S values. All corresponding S values in these intervals, starting with 1st, (S+1)th, . (17) dt1 ()()nTs f dt nT s (2S+1)th, etc. term, will be added to obtain the n1 truncated density function values for n = 1, 2, …., S. Using expression for the density function with Ts = These two mean values are not the same. The proof 1, the first values of the density function in the 1st, of their relationship is 2nd and m-th interval of S values will be S  ()()nT f sT  dt1  s dt s n1 fdt (  1)  ( e  1) e , TfT ( )  2 Tf  (2 T )  ...( STfST )  ( ) f(  S  1)  ( e  1) e(S 1) s dt s s dt s s dt s (18) dt TfTsdts ( )  TfT sdt  (2 s )  TfT sdt  (3 s )  ... TfST sdt  ( s )

TfTs  dt(2 s )  2 TfT s  dt (3 s )  ...( STfST  1)s  dt ( s )  mS  S S1 fdt (  mS )  ( e  1) e e Ts   f dt( nT s )  ( nTs )  f dt (( n  1) Ts ) Ts dt0 nn1 0 The sum of these values, when m tends to infinity, will give the first truncated value defined for unit Therefore, the mean value depends on the starting delay τ = 1, i.e., value of the discrete random variable of the density function, as we said in the previous section, and can  (e  1) vary with the duration of discrete interval Ts. It is fe(  1)  dt 1 eS important to have this difference in mind especially in the case when we are doing simulation of the

discrete delay values. Namely, in the case when the and the value for density function for any delay n first density function value is defined for n = 0, and will be the discrete variable values (variates) need to be

generated, then the variate values in the first interval (e  1) n . (14) from 0 to Ts will be equated with zero, and the fdt ()  nS e 1 e values from Ts to 2Ts will be equated with Ts and so on, until (S-1)Ts is reached. Therefore, if it is not If we assign these values to the weights of Dirac’s important to notify and take into account all the delta functions in the whole interval of possible delays inside the first Ts interval this presentation of truncated values S, we can get the truncated density the density function will be used. However, if all function in this form delays in the first Ts interval need to be taken into account, then the first sample of the density S  truncated function should be assigned to the first (e  1) n , (15) fdt ()  S e()  n discrete time instant Ts. n1 1 e Proposition: The mean and variance of the discrete truncated random variable, when the first discrete which completes our proof. In the process of density value with the first density value is at n = 1, are function discretisation, the discrete probability expressed in this form values were calculated at time instants nTs, starting with n = 1. This could be also done starting with the (SS  1) 1 Se( S  1) e  1 . (19) value n = 0. However, this will not be exactly the dt1  S same density function, because it will result in 11ee different mean values of the delay and imprecise simulation of the discrete delays, as we will show. This value is for one greater than the mean value ηdt0 For the case when the discrete values of the density of the discrete density with the first density value at function start at n = 0, the mean value is

E-ISSN: 2224-2880 230 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

n = 0. Therefore, the mean value ηdt0 in closed form function, continuous (non-truncated) density is function and continuous truncated density function are presented. There is obvious difference in the e ( S 1) eSS  Se (  1) 1 mean and variance values between non-truncated . (20) dt0  and truncated functions that should be taken into 11eeS account in theoretical analysis and simulation of discrete time systems. To this statement, in Thus, in practical applications, for the defined mean the next section we will present the procedure of value 1/λ of the continuous exponential distribution, generating variates of a discrete truncated the mean value of discrete exponential ηdt can be exponential density function. found and compared. Proof: Based on the expression (13) for the discrete 900 35 Disc Trunc density function we may have Disc Trunc 800 Disc Non-Trunc 30 Disc Non-Trunc Cont Non-Trunc 700 Cont Non-Trunc Cont Trunc  Cont Trunc (e  1) S 25 600  f()  d   en  ()   n d  dt1 dt S  20 500  1 e n1  Mean 400 15 S (ee 1) n ( 1) 300 10  SSne  S  200 11een1 5 100 0 0 10 20 30 0 The sum  can be found in a closed form from 0 10 20 30 S 1/λ 1/λ this expression Figure 2 The mean and variance of discrete S    nS(  1) truncated exponential function. SS  e  S (1  e )  ( e )  Se n1 . 1 eS (S  1) 2.3 Generating variates of the discrete truncated e Se 1 e exponential distribution In this section, a procedure of generating random variates of the truncated exponential discrete Having available S we may calculate the mean value as variable will be presented using the inverse transformation method. According to this method, variates of a uniform distribution F will be (e  1) 1 eSS ( e   1) Se(  1)  e generated, continuous delay value τ will be dt1 1eSS (1  e )2 1  e  1  e  , calculated and then a discrete variate value τv will be 1 Se(SS  1)( S  1) e  1 assigned. The value of the truncated discrete  11eeS exponential distribution function, for particular delay τ = τ, can be calculated for T =1 and v s expressed in this form which confirms (19). Using (18) for T = 1, we may s derive the expression for the mean of the random 1  . (22) variable that starts with n = 0 and prove (20). In Fdt ( )S (1 e )  F similar way, as it was presented in Giucaneanu 1 e paper [18] the variance is The delay is expressed as a function of the 2 2 2 distribution function value as dt E{}  dt (21) e2 2(1 eSS ) 2 Se(  1)   S( S  1) e(S 2) 1 1eS  (1  e )2 1  e   ln(1  FA / ) , (23) 

The two graphs, the mean and variance as a function where A is a constant, i.e., Ae1/ (1S ) . Then of parameter 1/λ, starting with 1/λ = 1 and finishing the uniform continuous valued variates F are with 1/λ = 30, for S = 40, are presented in Fig. 2. generated and the delay values are calculated Alongside with these graphs, the graphs of the mean according to (23). Because these calculated delay and variance for discrete non-truncated density

E-ISSN: 2224-2880 231 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

values are real numbers, they need to be equated to where δ(.) is Dirac’s delta function and the error  the integer values which are not smaller than the 2 x in the argument of τ, i.e., function complementary is erfc( ) 2 /  e dx .  Proof: The probability value inside the interval 1 . (24)  v  ln(1  FA / ) around zero can be calculated as  

Ts /2 The discrete values, calculated in this way, represent P{ T / 2   T / 2}  f ( ) d  s s  c the variates τv of an exponential truncated discrete Ts /2 density function that has the first discrete value at n  112 2 2 2 (27) = 1. However, if the first discrete value is to be at n e/2  de/2  d 22 22 = 0, the discrete truncated density and distribution TTss/2 /2 1TT / 2 1 / 2 functions are slightly different, the discrete delay erfcss erfc will be generated which is not greater than the 222222 generated uniform variate, i.e.,

1 . (25) fd (τ)  v  ln(1  FA / )  PTT{ / 2   / 2} ss

3 The Discrete Truncated Gaussian Density Function and Its Moments τ This section contains basic derivatives of the -nTs … -Ts/2 0 Ts/2 Ts … nTs Gaussian discrete and truncated discrete density Figure 3 Discretisation of Gaussian density function and related moment. function.

Similarly, the probability that the random variable is 3.1 The discrete Gaussian density function inside any discrete interval n is Following the general procedure of a continuous fc(τ) and related truncated continuous density P{(2 n 1) T /2   (2 n  1) T /2} ss. (28) function fct(τ) evaluation we will present here the 1 (2n 1)/2 T (2n 1)/2 T erfc sserfc discretisation of a Gaussian density function with a 22 2 22 zero mean value. The related derivations for any mean value can be relatively easily obtained. If the calculated probabilities are assigned as the The procedure of discretizing a continuous weights to the Dirac’s delta functions that are Gaussian density function is illustrated in Fig. 3. We defined at discrete instants τ = nTs, then the obtained will calculate the probability value inside Ts interval function represents the discrete Gaussian density and assign it to the discrete value of the random function expressed as variable. The probability inside shaded area in Fig. 3 will be assigned to the discrete random variable 1  defined for τ = 0. If we use the interval Ts on the left fd ()   P {(2 n 1)/2 Ts   (2 n  1)/2}(   nTs ) 2 nT  . (29) or on the right the discrete density function will s   introduce the mean value that is not equal to zero. 1 (2n 1)/2 Tss (2n 1)/2 T  erfc  erfc () nTs 2  22 For this reason, we are starting with the interval nTs  22 around the origin. Proposition: The discrete density function of For the unit interval, Ts = 1, this density is Gaussian random variable, having the values at the uniformly spaced instants Ts of a random variable τ, 1  (2nn 1) (2 1) f ()  erfc erfc ()   n can be expressed as d  22 2 n 88, (30)

1  1  (2n 1)/2 T (2 n 1)/2 T ss (26)  Erfc()() n n fds()  erfc  erfc ()   nT 2  22 2 n nTs  22

where the Erfc(n) is defined as

E-ISSN: 2224-2880 232 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

0.12

pdfc, sigma=5 (2nn 1) (2 1) pdfd, SD = 40 Erfc() n erfc erfc , (31) 0.1 pdfdt,S=5,7,10 8822

pdfc 0.08 which completes our proof. pdfd pdfdt 0.06

0.04 3.2 The discrete truncated Gaussian density 0.02 function

In order to find this truncated function, the whole 0 domain of possible discrete values τ from 0 to -40 -30 -20 -10 0 10 20 30 40 n infinity, for the already derived functions, need to be divided into intervals containing S discrete values. Figure 4 Continuous, discrete and discrete truncated All corresponding values in these intervals, starting Gaussian densities. DS is the interval of continuous st with 1 , (S+1)th, (2S+1)th, etc. terms, need to be and discrete random variable values. σ = 5 is the added to obtain the truncated density function standard deviation of continuous variable and S is values for n = 1, 2, …., S. However, in this case this truncation interval. method cannot give us the expression for density function in a closed form. For this reason, a method Proposition: The mean of the truncated discrete based on the definition of the continuous truncated density function is zero. density function will be used. According to this Proof: By definition method the truncated density function is defined as the conditional density function on the interval (-S, nS  f()()()()  d    PS Erfcn   nd  S) and expressed as dt t    nS (34) f () n S  n S f( ) f (  |  |  S )  d  P()()()()() S Erfc n     n d   P S n  Erfc n dt d  PSPS()()    n S  n S 1nS  (2nn 1) (2 1) erfc erfc ()n  22, (32) The term of the sum for n = 0 is zero. The 2 nS 88  corresponding terms for negative and positive n are 1nS  (2nn 1) (2 1) erfc erfc cancelling each other. Then, we may have  22 2 nS 88 nS nS  P()()() S Erfc n  n dt P()() S n Erfc n nS nS , (35) n1 n S where Erfc(n) is defined in (31) and P(S) is a P( S ) n  Erfc ( n )  P ( S ) n  Erfc ( n )  0 function defined on a truncation interval n S n1

which completes our proof. nS (2nn 1) (2 1) P() S erfc erfc . (33) Proposition: The variance of this density is  22 nS 88 nS 22. (36)  dt  P()() S n Erfc n The truncated density function, for different values n1 of the truncation interval S, is presented in Fig. 4 alongside with the continuous and discrete density Proof: By definition functions. When the truncation interval increases the truncated variance increases and is always smaller nS 2  2 f()()()()  d   P S Erfc n2    n d  that the variance of continuous density. The SD dt t  denotes the domain of discrete function before  nS  . (37) nS truncation and S defines the truncation interval, i.e.,  P()() S n2 Erfc n the domain of truncated variable. nS

E-ISSN: 2224-2880 233 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

The term for n = 0 is zero. The corresponding terms fd (τ) for negative and positive n are added to each other.

In addition, the we know that P(S) ≤ 1, thus, having PTT{ss / 2   / 2} in mind the variance for the discrete Gaussian random variable, we may have

n S n S 2 2 2 2 , (38) τ dt  P( S ) n Erfc ( n ) 2 P ( S ) n Erfc ( n )  -Tc -STs … -Ts/2 0 Ts/2 Ts … STs Tc n S n1

Figure 5 Discretisation of the uniform density which completes our proof. function.

In the case the number of positive and negative 4 The Discrete Truncated Uniform intervals is S, the whole interval is 22T ST T , Density Function and Its Moments c s s and the relations between the values Tc, Ts and S, which will be used in this Section, can be found in these forms 4.1 The discrete uniform density function Proposition: The discrete uniform density function 2T 21TTT is defined by this expression c 21S , S c s  c  . (44) T 22TT s ss nS 1 , (39) fds()  ()   nT Now, based on (42) and (44) the probability that the nS 21S  random variable is in the n-th interval can be expressed as and, for a unit interval Ts = 1, it is

P{(2 n 1) Tss /2   (2 n  1) T /2} nS 1 fn()  ()   . (40) T 1 (45) d  21S  s nS 2TS (2 1) c

Proof: Suppose the uniform continuous density Therefore, the discrete density function (43) can be function is expressed as fTcc( ) 1/ 2 , defined inside expressed as stated by (39) for any Ts including Ts = the interval . If it is discretised in TTcc   1. The calculated probability in Ts interval (for respect to τ, as shown in Fig. 5, with the interval of example the shaded interval in Fig. 5) is assigned as discretisation of Ts, the probability value in the first the weight of a delta function defined at the origin. interval around zero, n = 0, can be expressed as The probability values can be calculate in each Ts interval and assigned to the right or left of the 1 interval as we discussed for the exponential PTTT{ / 2   / 2}  . (41) s s 2T s function, with the similar consequences related to c the symmetry and moments of the truncated discrete

function. Similarly, the probability value in any interval n is Proposition: The mean, mean square and variance

are expressed as 1 . (42) P{(2 n 1) Ts /2   (2 n  1) Ts /2}  Ts 2Tc 22SS( 1) d  0 , ET{}  , s 3 These probabilities can be understood as the weights and of Dirac’s delta functions that define the discrete density function, which can be expressed as SS( 1) 2EET{}{}  2   2   2  2 , (46) d d s 3 S T f ()s  ()   nT . (43) ds 2T nS c And, for the unit interval Ts = 1, the variance is

E-ISSN: 2224-2880 234 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

SS( 1) 2 . (47) fdt( ) f d (  |  S  a    S  a)  d  3 Sa 1 . (51) ()nT f ()  21S  s Proofs: The proof for the mean is trivial. The mean d n S  a square value is P( S  a   S  a) PS()

n S 1  T 2 n S The value P(S) can be calculated as E{} 2  2  ()  nT d   s n2  s n S 2SS 1 2 1 n S (48)   Sa 1 22nS PS() 2Tss222TSSSSS ( 1)(2  1) (  1)   nT  s n S  a 21S  . (52) 2SS 1 2 1 6 3 n1 1 2Sa 2 1 (SaSa    1)  The variance is 2SS 1 2 1

SS( 1) By inserting this expression into (51), the density 2EET{}{}  2   2   2  2 . (49) function can be expressed as in (50). In the same d d s 3 way, for a unit sampling interval T = 1, the random s variable τ is a whole number from the interval (- 4.2 The discrete truncated uniform density S+a, S-a), for a ≥ 0, and the density function (51) is function expressed as in (50) In practical application the discrete delays are taking The variances of continuous, discrete and values in a limited interval defined as the truncated truncated discrete uniform density functions are interval (-S + a, S - a), where a ≤ S is a positive presented in Table 1. Due to discretisation, the whole number named the truncation factor. values of all truncated variances are smaller than the Therefore, the function that describes the delay variance of continuous density. This fact needs to be distribution is truncated and has the values in the taken into account in theoretical analysis and truncated interval, as shown in Fig. 6. simulation of discrete time systems.

ft (τ) Table 1 Variance expressions Uniform Variances distributions 22 Continuous  cc T /3 Continuous 2a 2 τ 22 truncated ct c 1 (-S+a)Ts 0 (S-a)Ts 21S 

Figure 6 Discrete truncated uniform density function Discrete 1 22 dc1 2 presented using Dirac’s delta functions. (2S  1)

Discrete 1 4a (2 S  a  1) Proposition: The density function is given in closed 22 truncated dt c 1 2 form by these expressions (2S  1)

1 n S a , fdt ()  ()  nTs 2(Sa ) 1 n S  a 4.3 The discrete asymmetric uniform density function and The above-mentioned discrete density functions preserved the symmetry in respect to the mean 1 n S a value. However, in discrete time signal analysis, due fndt () ()  . (50) T 1  to the nature of analogy-to-digital conversion, we s 2(Sa ) 1 n S  a are dealing with asymmetric densities. These Proof: Based on the definition of a truncated density functions can be obtained using the same density function as a conditional density function, procedure as for the symmetric densities described the truncated discrete uniform density function can above. The only difference is in the assignment of be expressed as discrete probability values that will start at the -Tc = -STs that corresponds to the discrete value S as shown in Fig. 7. In simple words we are assigning

E-ISSN: 2224-2880 235 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

the probabilities to the right side of the intervals redefined parameters: Tc = π, S = N/2, Tc = TsN/2. defined by Tc and making S discrete values on the Then, the discrete density function (53) has this negative τ axis and (S-1) discrete values at the form positive τ axis including also a component for τ = 0.

n N /2  1 11n N /2  1 fd (τ) fdn() ()     (   2 n / N ) n N /2 NNn N /2 PTTT{}     c c s and the mean value of the stochastic process can be calculated as  ()m E {(,)} X m x (,)() m  f  d  τ  d -Tc=-STs … -Ts 0 Ts … (S-1)Ts Tc 

 nN/2 1 1 Figure 7 Discretisation of the uniform density  x( m , )  (   2 n / N ) d    N (54) function to obtain an asymmetric discrete density  nN /2 A nN/2 1   sin(m   )  (   2 n / N ) d  Following the procedure in subsection 4.1 it can be   N nN /2  proven that the discrete probability density function A nN/2 1 can be expressed in terms of Dirac’s delta functions  sin(m 2 n / N ) N nN /2 as Due to the properties of sinusoidal function the sum nS1 1 , (53) in (54) is zero and the mean values of the stochastic fds()()     nT nS 2S process is zero for each m. The autocorrelation function needs to be calculated as Where the whole interval of continuous random variable values can be expressed as 22T ST .  cs RmlEXmXl(,) {(,)(,)}  XmXl (,)(,)()   f  d  Xd Therefore, the corresponding discrete variable here  can have S negative values and (S-1) positive  nN/2 1 1 values, i.e. it will have the density function that is   X( m , ) X ( l ,  )   (   2 n / N ) d   nN /2 N asymmetric in respect to the zero value. The A2 nN/2 1  consequence of this is that the mean value of the  [cos( (m l )  cos ( m  l  2  )  (   2 n / N ) d  2N   discrete density will be different from zero due to nN /2  this asymmetry. Following the procedures presented A2 nN/2 1   cos( (m l )   (  2 n / N ) d  in subsections 4.1 and 4.2 it is simple to derive the 2N nN /2  moments of this discrete density function and the A2 nN/2 1 related truncated density function.   cos( (m l 2 n / N ) 2N nN /2

The sum in the first addend is equal to N and the 5 Applications of Derived Expressions sum in the second term is zero which result in this FIRST CASE: The application of the presented expression for the autocorrelation function theory will be demonstrated on the solution for the first problem mentioned in the Introduction of this A2 R( m , l ) cos( (m l ) . (55) paper. Because the defined stochastic process X(m) X 2 is a discrete time process the number of phases is to be finite and needs to be represented by an Of course, the solutions presented in (1) and (2) are asymmetric density function expressed by (53). formally the same as in (54) and (55). However, the Suppose that the number of samples inside one right calculations are demonstrated in (54) and (55) period of the sinusoidal realisation of stochastic because they are based on rigorous mathematical process x(m) have N values. Therefore the number presentation of the density function and strict of random phases θn will be N all of them having the mathematical procedure in the related solutions of possible random values θn = 2πn/N, for n = -N/2, …, integrals. Therefore, the method of presenting N/2-1. discrete random variables I am proposing in this Therefore, the density function of the phase is paper can be used widely. Moreover, using the defined by expression (53) with the following densities in the presented forms the integrals

E-ISSN: 2224-2880 236 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

involved can be solved relatively easy. In addition Because the possible random delays can have any to this, we need to take care of various derivatives positive and negative value around zero we have of discrete densities for the same continuous random been using discrete symmetric density function. variable. For example, in the analysis of discrete The expression (5) presents the probability of time stochastic process, like above, we need to use error in DSSS system, which is equivalent to a an asymmetric density. However, in the case when single-user code division multiple access (CDMA) the variable represents random phase in system. If the CDMA system operates with N users, communication systems, which can take negative the expression for the probability of error is and corresponding positive random values with the same probability, we need to use a symmetric 1 1/2  1 4N 2 Eb (58) density function as can be mentioned in the third Pe () erfc   X (  )  1  X ( )   2  bN2 case. 0 SECOND CASE: We present here how to find the mean of the random function (3) by using and whereas 4(    / 4 N  1)/  . By inserting (58) solving integral (4). Suppose that the random delay and (50) into (4) the average value of the probability inside the chip interval τ is distributed according to of error can be calculated following the procedure the truncated discrete exponential density function. presented in (57), resulting in this expression Inserting expression (3) for the conditional probability of error and the expression for the  1 truncated discrete exponential density function (13) P P()() f  d  e e d t 4(Sa ) 2 into the expression for the mean value of the  . (59) probability of error (4), we may get the expression 1 1/2 S 42N E for the probability of error in a closed form as erfc  X( n )  (1  X ( n )) b   bN2 n1 0  SS(ee 1) 1 ( 1) P P()()() f  d   P n enn e e e d t e SS  nn111ee2 1 (56) The final notes we may make: Firstly, the 1/2 2 2 2 1 expressions for Gaussian and uniform density (  1) 1  1 n / 2 S  1  1  Eb erfc        functions are derived for the assumed zero mean 1 n / 2 S 1 n / 2 S 4 1 n / 2 S N       0 value of random variable. However, it is easy to derive the corresponding expressions for any mean Therefore, using the density functions expressions value of the discrete random variables, as was done as suggested in this paper it is relatively easy to for an example of asymmetric uniform distribution solve these integrals and avoid the use of numerical in subsection 4.3. Secondly, in this paper we integration. presented density functions of discrete random THIRD CASE: We can also find the variables in terms of Dirac’s delta functions. It is probability of error in a DSSS system as the average important to note that it is possible to develop and value of the conditional probability of error use their expressions using Kronecker’s delta presented in (4). For this system, it is impossible to functions. Thirdly, in practice, the discrete random achieve perfect synchronisation of the spreading variables take the values in limited intervals. sequences. Suppose the random delay τ in the Therefore, the use of truncated density functions is system with imperfect synchronisation is necessary. This necessity supports our motivation characterised by the uniform truncated density for writing this paper. Namely, the mean values and function expressed as (50). By inserting (5) and (50) variances are generally changing depending on the into (4) the average value for probability of error size of truncating interval, which can have can be found significant influence on our theoretical analysis, simulation and practical design of digital devices. 1 n S a P P()() f  d   P()()   n d  e e d t  e  2(Sa ) 1 n S  a  (57) 11S Pne () 2(S a )  1n1 4(S a )  2 6 Conclusions

1 1/2 S  4( / 4) 4 2 Eb In this paper the expressions for exponential,  erfc X( n )  (1  X ( n )) 2     bN n1 0 Gaussian and uniform discrete and truncated discrete density functions, and their first and second moments, are derived. The expressions for the

E-ISSN: 2224-2880 237 Volume 16, 2017 WSEAS TRANSACTIONS on MATHEMATICS Stevan Berber

moments are compared with related moments of the [10] Roy, D., The Discrete Normal Distribution. continuous and truncated continuous density Communications in – Theory and functions. It was confirmed that the density Methods 32:10, 2003, pp. 1871–1883. functions could be expressed in terms of Dirac’s [11] Xekalaki, E., Hazard Functions and Life delta functions in order to be applied for the Distributions in Discrete Time. calculation of the mean value of a function of Communications in Statistics – Theory and random variable. The application of derived Methods 12:21, 1983, pp. 25–2509. densities of discrete random variables is [12] Roy, D., Desgupta, T., A Discretizing demonstrated on three examples. One example Approach for Evaluating Reliability of presents a rigorous calculation of the mean and Complex Systems Under Stress-Strength autocorrelation function of a discrete time harmonic Model, IEEE Trans. on Reliability, 50:2, 2001, process, and two examples demonstrate precise pp. 145–150. calculations of the probability of error in DSSS [13] Roy, D., Discrete . IEEE communication systems where all signals are Trans. on Reliab., 53:2, 2004, pp. 255–256. represented in discrete time domain. [14] Ho, K., Cheng, K. H., A two-dimensional Fibonacci buddy system for dynamic resource References: management in a partitionable mesh. Aerospace and Electronics Conference, [1] H. M. Hayes, Statistical Digital Signal NAECON, Proceedings of the IEEE, 1, 1997, Processing and Modelling”, John Wiley & pp. 195–201. Sons, 1996. [15] Ansanullah, M, A Characteristic Property of [2] D. A. Poularkis “Discrete Random Signal the Exponential Distribution. The Annals of Processing and Filtering Primer with Statistics 5:3, 1977, pp. 580 – 583. MATLAB”, CRC Press, Boca Raton, 2009 [16] Seo, J. I., Kang, S. B., Notes on the exponential [3] Berber, M. S.., Probability of Error Derivatives half , Applied Mathematical for Binary and Chaos-Based CDMA Systems Modelling 39, 2015, pp. 6491–6500. in Wide-Band Channels. IEEE Trans. on [17] Raschke, M., Modeling of magnitude Wireless Communications 13/10, 2014, pp. distributions by the generalized truncated 5596–5606. exponential distribution, Journal of Seismology [4] Lo, C. M., W. Lam, H., Error probability of 19, 2015, pp. 265–271. binary phase shift keying in Nakagami-m [18] Giurcaneanu, C. D., Abeywickrama, R. V., fading channel with phase noise, Electronics Berber, S. , Performance Analysis for a Chaos- Letters 36, 2000, pp. 1773–1774. Based CDMA System in Wide-Band Channel, [5] Eng. T., Milstein L. B., Partially Coherent DS- The Journal of Engineering, 2015, pp. 9. SS Performance in Frequency Selective Multipath Fading, IEEE Trans. on Comm. 45, 1997, pp. 110–118. [6] Richards, M. A., Coherent Integration Loss Due to White Gaussian Phase Noise, IEEE Letter 10, 2003, pp. 208- 210. [7] Polprasert, C., Ritcey, J. A., A Nakagami Fading Phase Difference Distribution and its Impact on BER Performance, IEEE Trans. on Wirel.Comm. 7, 2008, pp. 110–118. [8] Song, X. F., Cheng, Y. J., Al-Dhahir, N., Xu, Z., Subcarrier Phase-Shift Keying Systems With Phase Errors in Lognormal Turbulence Channels. Journal of Lightwave Technology 33, 2015, pp. 1896–1904. [9] Chandra, A., Patra, A., Bose, C., Performance analysis of PSK systems with phase error in fading channels: A survey, Physical Communication 4, 2011, pp. 63–82.

E-ISSN: 2224-2880 238 Volume 16, 2017