betaFeedback

Reading v1View latest version

WorksMathematics

Longest run for qq-binary trials

Abstract

We investigate the longest-run distribution for binary trials in which the success probability varies geometrically. Exact formulae are derived for the probability mass function and the cumulative distribution function of the length of the longest success run in a sequence of qq-binary trials, using enumerative combinatorics. The setting covers independent but not necessarily identically distributed zero–one trials whose success probabilities follow a geometric rule, and the classical independent and identically distributed Bernoulli longest-run distribution is recovered in the limit q→1q\to 1. A simulation study confirms accurate maximum likelihood estimation of the base success probability and the geometric parameter qq, a well-calibrated and powerful boundary-corrected likelihood ratio test of the hypothesis that q=1q=1, and close agreement between the analytical cumulative distribution function and its empirical counterpart.

Introduction

Charalambides [13] investigated discrete qq-distributions arising from Bernoulli trials in which the probability of success varies geometrically. Let us consider a sequence X1,…,XnX_1,\ldots,X_n consisting of Bernoulli trials that result in either zero (failure) or one (success). The trials within each subsequence, starting immediately after the (i−1)(i-1)st zero and continuing up to the iith zero, are independent and share the same probability of failure. For i>0i > 0, the subsequence of trials that begins after the zero at position (i−1)(i - 1) forms the iith geometric sequence. For the iith geometric sequence, the probability qiq_i of zero remains unchanged throughout all trials and is defined as

qi=1−θqi−1,0<θ≤1,0<q≤1.(1)q_i = 1 - \theta q^{i-1}, \qquad0 < \theta\le1,\qquad0 < q \le1. \tag*{(1)}

According to the standard definitions, it follows from equation (1) that, for 0<q<10 < q < 1, the success probability 1−qi1-q_i decreases geometrically. Let Sj(0)=∑m=1j(1−Xm)S_j^{(0)} = \sum_{m=1}^{j}(1-X_m) denote the number of zeros in the first jj trials. The probability of observing zeros in the iith geometric sequence of trials corresponds to the conditional probability qj,iq_{j,i}, which represents the conditional probability of occurrence of a zero at trial jj given that exactly i−1i-1 zeros have occurred in the preceding trials. This relationship can be formally expressed as follows.

qj,i=P(Xj=0∣Sj−1(0)=i−1)=1−θqi−1,for i≤j.(2)q_{j,i}=P\left(X_j=0 \mid S_{j-1}^{(0)}=i-1\right)=1-\theta q^{i-1},\qquad\text{for }i\le j. \tag*{(2)}

To clarify the previous discussion, consider the sequence 111011110111100110 for n=18n=18. The geometric rule indicates that each bracketed subsequence has its own success and failure probabilities, as illustrated in Figure 1.

Figure 1. A qq-binary sequence of length n=18n=18, partitioned into geometric subsequences with failure probabilities qi=1−θqi−1q_i=1-\theta q^{i-1}

This stochastic model (1.1) or (1.2) has interesting applications, studied as a reliability growth model by Dubman and Sherman [16], and applies to a qq-boson theory in physics by Jing and Fan [25] and Jing [26]. The stochastic model (1.1) is applicable to start-up demonstration tests, functioning as a sequential-intervention model as introduced by Balakrishnan et al. [6].

The stochastic model (1.1) represents the qq-analog of the traditional binomial distribution, where the probabilities of zeros change geometrically. This establishes a stochastic framework for independent and identically distributed (IID) trials characterized by a failure probability function π\pi defined as follows:

πj=P(Xj=0)=1−θ,j>0,(3)\pi_j=P(X_j=0)=1-\theta,\qquad j>0, \tag*{(3)}

where 0<θ≤10<\theta\le1.

When qq approaches 11, the stochastic model described in (1.1) simplifies to the IID (Bernoulli) model given in (1.3). This occurs because qiq_i converges to πi\pi_i for i=1,2,…i = 1, 2, \ldots, or qj,iq_{j,i} converges to 1−θ1-\theta for i=1,2,…i = 1, 2, \ldots and j=1,2,…j = 1, 2, \ldots.

Numerous scholars have explored discrete qq-distributions, which arise from the stochastic framework of independent Bernoulli trials. Those interested in a detailed examination and extensive bibliography on this subject should refer to the papers by Charalambides [14] and the monograph by Charalambides [15] for further reading.

From a Mathematical and Statistical point of view, Charalambides [15] mentioned in the preface of his book “It should be noticed that a stochastic model of a sequence of independent Bernoulli trials, in which the probability of success at a trial is assumed to vary with the number of trials and/or the number of successes, is advantageous in the sense that it permits incorporating the experience gained from previous trials and/or successes. If the probability of success at a trial is a very general function of the number of trials and/or the number successes, very little can be inferred from it about the distributions of the various random variables that may be defined on this model. The assumption that the probability of success (or failure) at a trial varies geometrically, with rate (proportion) qq, leads to the introduction of discrete qq-distributions”.

In recent decades, the distribution theory of runs and patterns has been extensively developed, inspired by the foundational studies of Philippou and Muwafi [37], Philippou et al. [36], and Aki et al. [1]. This area of research has gained attention due to its theoretical significance and its wide-ranging applications in fields such as hypothesis testing, system reliability, quality control, physics, psychology, radar astronomy, molecular biology, computer science, insurance, and finance. These developments have been reviewed by Balakrishnan and Koutras [9] and Fu and Lou (2003), along with the references cited therein. Additionally, more recent contributions to this field include the works of Arapis et al. [3], Eryilmaz [19], Kong [28], Makri et al. [33], Aki [2], Gera [23], and Gera [24].

The random variable of interest is Ln(1)L_n^{(1)}, the length of the longest success run in a sequence of nn trials; we write Ln:=Ln(1)L_n := L_n^{(1)} when no confusion arises. Longest runs are important as they represent extreme values within the spectrum of run lengths. Let Rn(j)R_n^{(j)} denote the number of runs of type jj (j=0,1j = 0, 1) and xi(yi)x_i(y_i) represent the length of the iith run of successes (failures) in X1,…,XnX_1,\ldots,X_n. In addition, let Ln(j)L_n^{(j)} denote the longest run of type jj (j=0,1j = 0, 1). To further elaborate, consider a fixed number nn.

Ln(j)=max⁡{b∣Xa+1=⋯=Xa+b=j∧0≤a≤n−b},j=0,1,L_n^{(j)} = \max\left\{b \mid X_{a+1} = \cdots= X_{a+b} = j \land0 \le a \le n-b\right\}, \quad j = 0,1,
Ln(1)=max⁡1≤i≤Rn(1)xi,Ln(0)=max⁡1≤i≤Rn(0)yi.L_n^{(1)} = \max_{1 \le i \le R_n^{(1)}} x_i, \qquad L_n^{(0)} = \max_{1 \le i \le R_n^{(0)}} y_i.

For clarity, using an example, we mention that a sequence of ten trials is 0011110110. We have R10(0)=3R_{10}^{(0)} = 3, R10(1)=2R_{10}^{(1)} = 2, L10(0)=2L_{10}^{(0)} = 2, and L10(1)=4L_{10}^{(1)} = 4. Burr and Cane [7] studied the exact expression for the distribution of the longest run for IID Bernoulli trials. Fu and Koutras (1994) obtained the distribution of the longest run using a Markov-chain embedding technique. In contrast, Fu [22] developed a finite Markov-chain embedding technique to derive the exact distribution of LnL_n in sequences of multistate trials. Lou [30] investigated the joint distribution of the length of the longest success run and the number of successes as well as the conditional distribution of the longest-success-run length given the number of successes in sequences of Bernoulli trials. Asymptotic results for the longest-run statistics in a multistate Markov chain were explored by Vaggelatou [43]. Meanwhile, Makri et al. [34] derived the exact probability function of the longest-run statistics for linear and circular sequences through combinatorial analysis. Numerous researchers have contributed to studying longest-run statistics in various scenarios, including Bernoulli trials, Markov-dependent trials, and exchangeable binary trials. For further insights, refer to works such as those by Philippou and Makri [38, 39, 40], Antzoulakos and Philippou [4, 5], Charalambides [11], Serkan [41]; Eryilmaz [17, 18], and Muselli [35].

As mentioned by Johnson et al. [27], “The formulas for the probabilities for these distributions are not at first sight very illuminating; also in some cases, there is more than one correct published expression for the probabilities.” Fu and Koutras (1994) mentioned that some formulas are complicated and hard to compute. In this paper, we derive explicit probability functions for the longest success run in binary trials whose success probabilities vary according to a geometric rule. Our results provide a direct longest-run formulation based on enumerative combinatorics and are complemented by numerical verification and statistical inference for the model parameters.

Herein, we study the distribution of the length of the longest success run, with the probability of ones varying according to a geometric rule. The paper is organized as follows. In § 2 we introduce basic definitions and necessary notations that will be useful throughout this article. In Section 3 we shall study the probability mass and cumulative distribution functions of the length of the longest success run. We derive the exact probability function and the cumulative distribution function (CDF) of the longest-success-run length through combinatorial analysis, and illustrate these results numerically for indicative parameter values. In § 6, we conduct a simulation study to assess the accuracy of the maximum likelihood estimator of (θ,q)(\theta,q), to evaluate the size and power of a boundary-corrected likelihood ratio test of H0:q=1H_0:q=1, and to compare the derived analytical cumulative distribution function of the longest-success-run length with its empirical counterpart.

Terminology and notation

We first recall some definitions, notations, and known results, which will be used in this paper. Throughout the paper, we suppose that 0<q≤10<q\leq1. First, we introduce the following notation.

  • Ln(1)L_n^{(1)}: the length of the longest run of successes in X1,X2,…,XnX_1,X_2,\ldots,X_n;

  • Ln(0)L_n^{(0)}: the length of the longest run of failures in X1,X2,…,XnX_1,X_2,\ldots,X_n;

  • SnS_n: the total number of successes in X1,X2,…,XnX_1,X_2,\ldots,X_n;

  • FnF_n: the total number of failures in X1,X2,…,XnX_1,X_2,\ldots,X_n.

We write (a;q)0=1(a;q)_0=1 and (a;q)n=∏k=0n−1(1−aqk)(a;q)_n=\prod_{k=0}^{n-1}(1-aq^k) for n≥1n\ge1. For 0<q<10<q<1 and integers n≥r≥0n\ge r\ge0, the qq-binomial coefficient (Gaussian polynomial) is

[nr]q=(q;q)n(q;q)r(q;q)n−r,\begin{bmatrix} n \\ r \end{bmatrix}_q=\frac{(q;q)_n}{(q;q)_r(q;q)_{n-r}},

and the case q=1q=1 is understood in the limiting sense lim⁡q→1[nr]q=(nr)\lim_{q\to1}\begin{bmatrix} n \\ r \end{bmatrix}_q=\binom{n}{r}. Let us consider again a sequence of independent geometric sequences of trials with probability of failure at the iith geometric sequence of trials given by (1) or (2). We now focus on the number of successes in a given number of trials in this stochastic model.

Definition 2.1 Let ZnZ_n be the number of successes in a sequence of nn independent Bernoulli trials, with probability of failure at the iith geometric sequence of trials given by (1) or (2). The distribution of the random variable ZnZ_n is called qq-binomial distribution, with parameters nn, θ\theta, and qq.

We now introduce a qq-analog of the binomial distribution. The probability function of the number ZnZ_n of successes in nn trials X1,…,XnX_1,\ldots,X_n is given by

Pq,θ{Zn=r}=[nr]qθr∏i=1n−r(1−θqi−1),(4)P_{q,\theta}\{Z_n=r\}=\begin{bmatrix} n \\ r \end{bmatrix}_q\theta^r\prod_{i=1}^{n-r}(1-\theta q^{i-1}), \tag*{(4)}

for r=0,1,…,nr=0,1,\ldots,n and 0<q≤10<q\le1. The distribution is called a qq-binomial distribution. For q→1q\to1, because

lim⁡q→1[nr]q=(nr)\lim_{q\to1}\begin{bmatrix} n \\ r \end{bmatrix}_q=\binom{n}{r}

so that the qq-binomial distribution converges to the usual binomial distribution as q→1q\to1, as follows

Pθ(Zn=r)=(nr)θr(1−θ)n−r,r=0,1,…,n,(5)P_\theta(Z_n=r)=\binom{n}{r}\theta^r(1-\theta)^{n-r},\quad r=0,1,\ldots,n, \tag*{(5)}

with parameters nn and θ\theta. The qq-binomial distribution studied by Charalambides [14, 15] is connected with the qq-Bernstein polynomials. Jing [26] introduced the probability function (4) as a qq-deformed binomial distribution and also derived a recurrence relation for its probability distribution. In the sequel, Pq,θ(⋅)P_{q,\theta}(\cdot) and Pθ(⋅)P_\theta(\cdot) denote probabilities related with the stochastic model (1) and (3), respectively.

In this section, we delve into the distribution of the length of the longest success run for binary (zero and one) trials, where the probability of encountering ones follows a geometric rule. First, we derive the exact expression for the PMF Pq,θ(Ln(1)=k)P_{q,\theta}\left(L_n^{(1)}=k\right), representing the distribution of the length Ln(1)L_n^{(1)} of the longest success run. Subsequently, we obtain the cumulative distribution function Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)}\leq k\right) for Ln(1)L_n^{(1)}, the longest-success-run length. These results are derived through enumerative combinatorics.

Closed-form expression for the PMF of Ln(1)L_n^{(1)}

We now present a definition and a lemma that will be used in the proofs of the theorems in the sequel.

Definition 3.1 For 0<q≤10<q\leq1, we define

Uqk(r,s,t)=∑x1,…,xrqx2+2x3+⋯+(r−1)xrU_q^k(r,s,t)=\sum_{x_1,\ldots,x_r}q^{x_2+2x_3+\cdots+(r-1)x_r}

where the summation is over all integers x1,…,xrx_1,\ldots,x_r satisfying

0≤xj≤k for j=1,…,r,x1+⋯+xr=s, andδx1,k+⋯+δxr,k=t.\begin{aligned} 0&\leq x_j\leq k\ \text{for }j=1,\ldots,r,\\ x_1+\cdots+x_r&=s,\ \text{and}\\ \delta_{x_1,k}+\cdots+\delta_{x_r,k}&=t. \end{aligned}

The following gives a recurrence relation useful for the computation of Uqk(r,s,t)U_q^k(r,s,t).

Lemma 3.1 For 0<q≤10<q\leq1, Uqk(r,s,t)U_q^k(r,s,t) obeys the following recurrence relation.

Uqk(r,s,t)={∑a=0k−1qa(r−1)Uqk(r−1,s−a,t)+qk(r−1)Uqk(r−1,s−k,t−1),for r>1, tk≤s≤rk and t≤r,1,for r=1, s=k, and t=1,1,or r=1, 0≤s<k, and t=0,0,otherwise.U_q^k(r,s,t)= \begin{cases} \sum_{a=0}^{k-1}q^{a(r-1)}U_q^k(r-1,s-a,t)+q^{k(r-1)}U_q^k(r-1,s-k,t-1), & \text{for }r>1,\ tk\leq s\leq rk\text{ and }t\leq r,\\ 1, & \text{for }r=1,\ s=k,\text{ and }t=1,\\ 1, & \text{or }r=1,\ 0\leq s<k,\text{ and }t=0,\\ 0, & \text{otherwise.} \end{cases}

Proof. For r>1r>1, tk≤s≤rktk\le s\le rk and t≤rt\le r, we observe that since xrx_r can assume the values 0,…,k0,\ldots,k, then Uqk(r,s,t)U_q^k(r,s,t) can be written as follows.

Uqk(r,s,t)=∑xr=0k−1qxr(r−1)∑x1+⋯+xr−1=s−xrx1,…,xr−1∈{0,1,…,k}δx1,k+⋯+δxr−1,k=tqx2+2x3+⋯+(r−2)xr−1+qk(r−1)∑x1+⋯+xr−1=s−kx1,…,xr−1∈{0,1,…,k}δx1,k+⋯+δxr−1,k=t−1qx2+2x3+⋯+(r−2)xr−1.\begin{aligned} U_q^k(r,s,t)={}&\sum_{x_r=0}^{k-1}q^{x_r(r-1)} \sum_{\substack{x_1+\cdots+x_{r-1}=s-x_r\\x_1,\ldots,x_{r-1}\in\{0,1,\ldots,k\}\\\delta_{x_1,k}+\cdots+\delta_{x_{r-1},k}=t}} q^{x_2+2x_3+\cdots+(r-2)x_{r-1}}\\ &+q^{k(r-1)} \sum_{\substack{x_1+\cdots+x_{r-1}=s-k\\x_1,\ldots,x_{r-1}\in\{0,1,\ldots,k\}\\\delta_{x_1,k}+\cdots+\delta_{x_{r-1},k}=t-1}} q^{x_2+2x_3+\cdots+(r-2)x_{r-1}}. \end{aligned}

Using simple algebraic arguments to simplify, then Uqk(r,s,t)U_q^k(r,s,t) can be rewritten as follows.

Uqk(r,s,t)=∑a=0k−1qa(r−1)Uqk(r−1,s−a,t)+qk(r−1)Uqk(r−1,s−k,t−1).U_q^k(r,s,t)=\sum_{a=0}^{k-1}q^{a(r-1)}U_q^k(r-1,s-a,t)+q^{k(r-1)}U_q^k(r-1,s-k,t-1).

The other cases are obvious and thus the proof is completed. □

Remark 3.1 We observe that U1k(r,s,t)U_1^k(r,s,t) is the number of integer solutions (x1,…,xr)(x_1,\ldots,x_r) of

0≤xj≤kfor j=1,…,r,0\le x_j\le k\quad\text{for }j=1,\ldots,r,
x1+⋯+xr=s,andx_1+\cdots+x_r=s,\quad\text{and}
δx1,k+⋯+δxr,k=t.\delta_{x_1,k}+\cdots+\delta_{x_r,k}=t.

which is

U1k(r,s,t)=(rt)C(s−tk,r−t,k−1),U_1^k(r,s,t)=\binom{r}{t}C(s-tk,r-t,k-1),

denotes the number of ways of distributing ss identical balls into rr different cells while ensuring that each of tt cells receives exactly kk balls, with the remaining s−tks-tk balls placed in the remaining r−tr-t cells such that no cell receives more than k−1k-1 balls. In addition, C(a,b,c)C(a,b,c) represents the total number of integer solutions to the equation x1+x2+⋯+xb=ax_1+x_2+\cdots+x_b=a, subject to the condition 0≤xi≤c0\le x_i\le c for i=1,2,…,bi=1,2,\ldots,b. Alternatively, C(a,b,c)C(a,b,c) indicates the number of ways of distributing aa identical balls into bb different cells while ensuring that each cell is occupied by at most cc balls. This number can be expressed as follows:

C(a,b,c)=∑j=0b(−1)j(bj)(a−(c+1)j+b−1b−1).C(a,b,c)=\sum_{j=0}^{b}(-1)^j\binom{b}{j}\binom{a-(c+1)j+b-1}{b-1}.

Here C(a,b,c)C(a,b,c) equals the displayed sum if a>0a>0, equals 11 if a=0a=0, and equals 00 otherwise (see, e.g., [12].

We shall study the distribution of the length Ln(1)L_n^{(1)} of the longest success run. The probability mass function Pq,θ(Ln(1)=k)P_{q,\theta}(L_n^{(1)}=k) is obtained by the following theorem. It is evident that

Pq,θ(Ln(1)=0)=∏j=1n(1−θqj−1)for k=0P_{q,\theta}(L_n^{(1)}=0)=\prod_{j=1}^{n}(1-\theta q^{j-1})\quad\text{for }k=0

and so we shall focus on determining the probability mass function for 1≤k≤n1\le k\le n.

Theorem 3.1 The PMF Pq,θ(Ln(1)=k)P_{q,\theta}\left(L_n^{(1)}=k\right), for k=1,…,nk=1,\ldots,n, is given by

Pq,θ(Ln(1)=k)=∑y=⌈n/(k+1)⌉n−kθn−y∏j=1y(1−θqj−1)∑i=1y+1Uqk(y+1,n−y,i).P_{q,\theta}\left(L_n^{(1)}=k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n-k}\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)\sum_{i=1}^{y+1}U_q^k(y+1,n-y,i).

Proof. We partition the event {Ln(1)=k}\left\{L_n^{(1)}=k\right\} into disjoint events given by Fn=yF_n=y, for y=⌈n/(k+1)⌉,…,n−ky=\lceil n/(k+1)\rceil,\ldots,n-k. Adding the probabilities, we have

Pq,θ(Ln(1)=k)=∑y=⌈n/(k+1)⌉n−kPq,θ(Ln(1)=k∧Fn=y).P_{q,\theta}\left(L_n^{(1)}=k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n-k}P_{q,\theta}\left(L_n^{(1)}=k\mathbin{\wedge}F_n=y\right).

We focus on the event {Ln(1)=k∧Fn=y}\left\{L_n^{(1)}=k\mathbin{\wedge}F_n=y\right\}. A typical element of this event, denoted as {Ln(1)=k∧Fn=y}\left\{L_n^{(1)}=k\mathbin{\wedge}F_n=y\right\}, consists of an ordered sequence comprising n−yn-y successes and yy failures such that the length of the longest success run is equal to kk. The number of such sequences can be derived as follows. First, we distribute the yy failures, forming y+1y+1 cells. Next, we distribute the n−yn-y successes among these y+1y+1 distinguishable cells in a way that satisfies the following conditions: among these cells, denoted as ii (i=1,…,min⁡{y+1,⌊(n−y)/k⌋}i=1,\ldots,\min\{y+1,\lfloor(n-y)/k\rfloor\}), exactly kk successes occupy each of the specified cells. The remaining n−y−ikn-y-ik successes can then be distributed among the remaining y+1−iy+1-i cells, ensuring no cell receives more than k−1k-1 successes. Thus, the event {Ln(1)=k∧Fn=y}\left\{L_n^{(1)}=k\mathbin{\wedge}F_n=y\right\} is defined as follows.

1…1⏟0≤x1≤k 0 1…1⏟0≤x2≤k 0 1…1⏟0≤x3≤k 0…0 1…1⏟0≤xy≤k 0 1…1⏟0≤xy+1≤k,\underbrace{1\ldots1}_{0\leq x_1\leq k}\ 0\ \underbrace{1\ldots1}_{0\leq x_2\leq k}\ 0\ \underbrace{1\ldots1}_{0\leq x_3\leq k}\ 0\ldots0\ \underbrace{1\ldots1}_{0\leq x_y\leq k}\ 0\ \underbrace{1\ldots1}_{0\leq x_{y+1}\leq k},

with yy 0’s and n−yn-y 1’s, where xjx_j (j=1,…,y+1j=1,\ldots,y+1) represents a length of a run of 1’s. And all integers x1,…,xy+1x_1,\ldots,x_{y+1} satisfy the conditions

0≤xj≤k for j=1,…,y+1,x1+⋯+xy+1=n−y,and0\leq x_j\leq k\text{ for }j=1,\ldots,y+1,\quad x_1+\cdots+x_{y+1}=n-y,\quad\text{and}
δx1,k+δx2,k+⋯+δxy+1,k=i.\delta_{x_1,k}+\delta_{x_2,k}+\cdots+\delta_{x_{y+1},k}=i.

Then the probability of the event {Ln(1)=k∧Fn=y}\left\{L_n^{(1)}=k\mathbin{\wedge}F_n=y\right\} is given by

Pq,θ(Ln(1)=k∧Fn=y)=∑i=1y+1{∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,…,k}δx1,k+⋯+δxy+1,k=i(θq0)x1(1−θq0)(θq1)x2(1−θq1)⋯(1−θqy−2)(θqy−1)xy(1−θqy−1)(θqy)xy+1}.\begin{aligned} P_{q,\theta}\left(L_n^{(1)}=k\mathbin{\wedge}F_n=y\right) ={}&\sum_{i=1}^{y+1}\Bigg\{\sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,\ldots,k\}\\\delta_{x_1,k}+\cdots+\delta_{x_{y+1},k}=i}} (\theta q^0)^{x_1}(1-\theta q^0)(\theta q^1)^{x_2}(1-\theta q^1)\\ &\qquad\cdots(1-\theta q^{y-2})(\theta q^{y-1})^{x_y}(1-\theta q^{y-1})(\theta q^y)^{x_{y+1}}\Bigg\}. \end{aligned}

Using simple exponentiation algebra arguments to simplify,

Pq,θ(Ln(1)=k∧Fn=y)=θn−y∏j=1y(1−θqj−1)∑i=1y+1∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,1,…,k}δx1,k+⋯+δxy+1,k=iqx2+2x3+⋯+(y−1)xy+yxy+1.\begin{aligned} P_{q,\theta}\left(L_n^{(1)}=k\mathbin{\wedge}F_n=y\right) ={}&\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)\sum_{i=1}^{y+1} \sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,1,\ldots,k\}\\\delta_{x_1,k}+\cdots+\delta_{x_{y+1},k}=i}} q^{x_2+2x_3+\cdots+(y-1)x_y+yx_{y+1}}. \end{aligned}

Using Lemma 3.1, we can rewrite as follows.

Pq,θ(Ln(1)=k∧Fn=y)=θn−y∏j=1y(1−θqj−1)∑i=1y+1Uqk(y+1,n−y,i).P_{q,\theta}\left(L_n^{(1)}=k \mathbin{\wedge} F_n=y\right)=\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)\sum_{i=1}^{y+1}U_q^k(y+1,n-y,i).

where

Uqk(y+1,n−y,i)=∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,1,…,k}δx1,k+⋯+δxy+1,k=iqx2+2x3+⋯+(y−1)xy+yxy+1.U_q^k(y+1,n-y,i)=\sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,1,\ldots,k\}\\\delta_{x_1,k}+\cdots+\delta_{x_{y+1},k}=i}}q^{x_2+2x_3+\cdots+(y-1)x_y+yx_{y+1}}.

Therefore we can compute the probability of the event {Ln(1)=k}\left\{L_n^{(1)}=k\right\} as follows.

Pq,θ(Ln(1)=k)=∑y=⌈n/(k+1)⌉n−kθn−y∏j=1y(1−θqj−1)∑i=1y+1Uqk(y+1,n−y,i).P_{q,\theta}\left(L_n^{(1)}=k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n-k}\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)\sum_{i=1}^{y+1}U_q^k(y+1,n-y,i).

Thus, proof is completed. □\square

It is worth mentioning here that the PMF Pq,θ(Ln(1)=k)P_{q,\theta}\left(L_n^{(1)}=k\right) approaches the PMF Pθ(Ln(1)=k)P_{\theta}\left(L_n^{(1)}=k\right) of the IID model as qq tends to 1. The details are presented in the following remark.

Remark 3.2 For q=1q=1, the PMF Pq,θ(Ln(1)=k)P_{q,\theta}\left(L_n^{(1)}=k\right) reduces to the PMF Pθ(Ln(1)=k)P_{\theta}\left(L_n^{(1)}=k\right). Then Pθ(Ln(1)=0)=(1−θ)nP_{\theta}\left(L_n^{(1)}=0\right)=(1-\theta)^n, and for 1≤k≤n1\leq k\leq n the PMF is given by

Pθ(Ln(1)=k)=∑y=⌈n/(k+1)⌉n−kθn−y(1−θ)y∑i=1y+1U1k(y+1,n−y,i)=∑y=⌈n/(k+1)⌉n−kθn−y(1−θ)y∑i=1y+1(y+1i)C(n−y−ik,y+1−i,k−1),\begin{aligned} P_{\theta}\left(L_n^{(1)}=k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n-k}\theta^{n-y}(1-\theta)^y\sum_{i=1}^{y+1}U_1^k(y+1,n-y,i) \\ &=\sum_{y=\lceil n/(k+1)\rceil}^{n-k}\theta^{n-y}(1-\theta)^y\sum_{i=1}^{y+1}\binom{y+1}{i}C(n-y-ik,y+1-i,k-1), \end{aligned}

where

C(a,b,c)=∑j=0b(−1)j(bj)(a−(c+1)j+b−1b−1).C(a,b,c)=\sum_{j=0}^{b}(-1)^j\binom{b}{j}\binom{a-(c+1)j+b-1}{b-1}.

Here C(a,b,c)C(a,b,c) equals the displayed sum if a>0a>0, equals 1 if a=0a=0, and equals 0 otherwise (see, e.g., Charalambides [12]).

Closed-form expression for the CDF of Ln(1)L_n^{(1)}

We now present a definition and a lemma that will be used in the proofs of the theorems in the sequel.

Definition 3.2 For 0<q≤10<q\leq1, we define

Vq(r,s,k)=∑x1,…,xrqx2+2x3+⋯+(r−1)xr,V_q(r,s,k)=\sum_{x_1,\ldots,x_r}q^{x_2+2x_3+\cdots+(r-1)x_r},

where the summation is over all integers x1,…,xrx_1,\ldots,x_r satisfying

0≤xj≤kfor j=1,…,r,and0 \le x_j \le k \quad\text{for } j=1,\ldots,r,\quad\text{and}
x1+⋯+xr=sx_1+\cdots+x_r=s

The following gives a recurrence relation useful for the computation of Vq(r,s,k)V_q(r,s,k).

Lemma 3.2 For 0<q≤10<q\le1, Vq(r,s,k)V_q(r,s,k) obeys the following recurrence relation.

Vq(r,s,k)={∑a=0kqa(r−1)Vq(r−1,s−a,k)for r>1, and 0≤s≤kr,1for r=1, and 0≤s≤k, or0otherwise.V_q(r,s,k)= \begin{cases} \sum_{a=0}^{k}q^{a(r-1)}V_q(r-1,s-a,k) & \text{for } r>1,\ \text{and } 0\le s\le kr,\\ 1 & \text{for } r=1,\ \text{and } 0\le s\le k,\ \text{or}\\ 0 & \text{otherwise.} \end{cases}

Proof For r>1r>1 and 0≤s≤kr0\le s\le kr, we observe that since xrx_r can assume the values 0,…,k0,\ldots,k, then Vq(r,s,k)V_q(r,s,k) can be written as follows.

Vq(r,s,k)=∑xr=0kqxr(r−1)∑x1+⋯+xr−1=s−xrx1,…,xr−1∈{0,1,…,k}qx2+2x3+⋯+(r−2)xr−1V_q(r,s,k)=\sum_{x_r=0}^{k}q^{x_r(r-1)} \sum_{\substack{x_1+\cdots+x_{r-1}=s-x_r\\x_1,\ldots,x_{r-1}\in\{0,1,\ldots,k\}}} q^{x_2+2x_3+\cdots+(r-2)x_{r-1}}

Using simple algebraic arguments to simplify, then Vq(r,s,k)V_q(r,s,k) can be rewritten as follows.

Vq(r,s,k)=∑a=0kqa(r−1)Vq(r−1,s−a,k).V_q(r,s,k)=\sum_{a=0}^{k}q^{a(r-1)}V_q(r-1,s-a,k).

The other cases are obvious and thus the proof is completed. □

Remark 3.3 We observe that V1(r,s,k)V_1(r,s,k) is the number of integer solutions (x1,…,xr)(x_1,\ldots,x_r) of

0≤xj≤kfor j=1,…,r,and0\le x_j\le k\quad\text{for }j=1,\ldots,r,\quad\text{and}
x1+⋯+xr=sx_1+\cdots+x_r=s

which is

V1(r,s,k)=C(s,r,k),V_1(r,s,k)=C(s,r,k),

where C(a,b,c)C(a,b,c) denotes the total number of integer solutions x1+x2+⋯+xb=ax_1+x_2+\cdots+x_b=a such that 0≤xi≤c0\le x_i\le c for i=1,2,…,bi=1,2,\ldots,b. Alternatively, it is the number of ways of distributing aa identical balls into bb different cells so that each cell is occupied by at most cc balls. The number can be expressed as

C(a,b,c)=∑j=0b(−1)j(bj)(a−(c+1)j+b−1b−1).C(a,b,c)=\sum_{j=0}^{b}(-1)^j\binom{b}{j}\binom{a-(c+1)j+b-1}{b-1}.

Here C(a,b,c)C(a,b,c) equals the displayed sum if a>0a>0, equals 11 if a=0a=0, and equals 00 otherwise (see, e.g., Charalambides [12]).

We shall study the cumulative distribution function Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)} \le k\right) of the length Ln(1)L_n^{(1)} of the longest success run. The CDF Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)} \le k\right) is obtained by the following theorem.

Theorem 3.2 The cumulative distribution function Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)} \le k\right) of the length Ln(1)L_n^{(1)} of the longest success run is given by

Pq,θ(Ln(1)≤k)=∑y=⌈n/(k+1)⌉nθn−y∏j=1y(1−θqj−1)Vq(y+1,n−y,k).P_{q,\theta}\left(L_n^{(1)} \le k\right)=\sum_{y=\left\lceil n/(k+1)\right\rceil}^{n}\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)V_q(y+1,n-y,k).

Proof. We partition the event {Ln(1)≤k}\left\{L_n^{(1)} \le k\right\} into disjoint events given by Fn=yF_n=y, for y=⌈n/(k+1)⌉,…,ny=\left\lceil n/(k+1)\right\rceil,\ldots,n. Adding the probabilities we have

Pq,θ(Ln(1)≤k)=∑y=⌈n/(k+1)⌉nPq,θ(Ln(1)≤k∧Fn=y).P_{q,\theta}\left(L_n^{(1)} \le k\right)=\sum_{y=\left\lceil n/(k+1)\right\rceil}^{n}P_{q,\theta}\left(L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right).

We focus on the event {Ln(1)≤k∧Fn=y}\left\{L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right\}. A typical element of this event, denoted as {Ln(1)≤k∧Fn=y}\left\{L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right\}, consists of an ordered sequence comprising n−yn-y successes and yy failures such that the length of the longest success run is less than or equal to kk. The number of such sequences can be derived as follows. First, we distribute the yy failures, forming y+1y+1 cells. Next, we distribute the n−yn-y successes among these y+1y+1 distinguishable cells, ensuring that each cell is occupied by at most kk successes. Thus, the event {Ln(1)≤k∧Fn=y}\left\{L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right\} is defined as follows:

1…1⏟0≤x1≤k 0 1…1⏟0≤x2≤k 0 1…1⏟0≤x3≤k 0…0 1…1⏟0≤xy≤k 0 1…1⏟0≤xy+1≤k,\underbrace{1\ldots1}_{0\le x_1\le k}\ 0\ \underbrace{1\ldots1}_{0\le x_2\le k}\ 0\ \underbrace{1\ldots1}_{0\le x_3\le k}\ 0\ldots0\ \underbrace{1\ldots1}_{0\le x_y\le k}\ 0\ \underbrace{1\ldots1}_{0\le x_{y+1}\le k},

with yy 0’s and n−yn-y 1’s, where xjx_j (j=1,…,y+1j=1,\ldots,y+1) represents a length of a run of 1’s. In addition, all integers x1,…,xy+1x_1,\ldots,x_{y+1} satisfy the conditions

0≤xj≤k for j=1,…,y+1,andx1+⋯+xy+1=n−y,0\le x_j\le k\ \text{for }j=1,\ldots,y+1,\quad\text{and}\quad x_1+\cdots+x_{y+1}=n-y,

Then the probability of the event {Ln(1)≤k∧Fn=y}\left\{L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right\} is given by

Pq,θ(Ln(1)≤k∧Fn=y)=∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,1,…,k}(θq0)x1(1−θq0)(θq1)x2(1−θq1)⋯(1−θqy−2)(θqy−1)xy(1−θqy−1)(θqy)xy+1.\begin{aligned} P_{q,\theta}\left(L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right) ={}&\sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,1,\ldots,k\}}} (\theta q^0)^{x_1}(1-\theta q^0)(\theta q^1)^{x_2}(1-\theta q^1)\\ &\qquad\cdots(1-\theta q^{y-2})(\theta q^{y-1})^{x_y}(1-\theta q^{y-1})(\theta q^y)^{x_{y+1}}. \end{aligned}

Using simple exponentiation algebra arguments to simplify,

Pq,θ(Ln(1)≤k∧Fn=y)=θn−y∏j=1y(1−θqj−1)∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,1,…,k}qx2+2x3+⋯+(y−1)xy+yxy+1.P_{q,\theta}\left(L_n^{(1)} \le k\mathbin{\wedge}F_n=y\right)=\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right) \sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,1,\ldots,k\}}} q^{x_2+2x_3+\cdots+(y-1)x_y+yx_{y+1}}.

Using Lemma 3.2, we can rewrite as follows.

Pq,θ(Ln(1)≤k∧Fn=y)=θn−y∏j=1y(1−θqj−1)Vq(y+1,n−y,k).P_{q,\theta}\left(L_n^{(1)} \le k \mathbin{\wedge} F_n=y\right)=\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)V_q(y+1,n-y,k).

where

Vq(y+1,n−y,k)=∑x1+⋯+xy+1=n−yx1,…,xy+1∈{0,1,…,k}qx2+2x3+⋯+(y−1)xy+yxy+1.V_q(y+1,n-y,k)=\sum_{\substack{x_1+\cdots+x_{y+1}=n-y\\x_1,\ldots,x_{y+1}\in\{0,1,\ldots,k\}}}q^{x_2+2x_3+\cdots+(y-1)x_y+yx_{y+1}}.

Therefore we can compute the probability of the event {Ln(1)≤k}\left\{L_n^{(1)}\le k\right\} as follows.

Pq,θ(Ln(1)≤k)=∑y=⌈n/(k+1)⌉nθn−y∏j=1y(1−θqj−1)Vq(y+1,n−y,k).P_{q,\theta}\left(L_n^{(1)}\le k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n}\theta^{n-y}\prod_{j=1}^{y}\left(1-\theta q^{j-1}\right)V_q(y+1,n-y,k).

Thus proof is completed. □

It is worth mentioning here that the CDF Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)}\le k\right) approaches the CDF Pθ(Ln(1)≤k)P_{\theta}\left(L_n^{(1)}\le k\right) of the IID model in the limit as qq tends to 1. The details are presented in the following remark.

Remark 3.4 For q=1q=1, the CDF Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)}\le k\right) reduces to the CDF Pθ(Ln(1)≤k)P_{\theta}\left(L_n^{(1)}\le k\right), which is given by

Pθ(Ln(1)≤k)=∑y=⌈n/(k+1)⌉nθn−y(1−θ)yV1(y+1,n−y,k)=∑y=⌈n/(k+1)⌉nθn−y(1−θ)yC(n−y,y+1,k),\begin{aligned} P_{\theta}\left(L_n^{(1)}\le k\right)=\sum_{y=\lceil n/(k+1)\rceil}^{n}\theta^{n-y}(1-\theta)^yV_1(y+1,n-y,k) \\ &=\sum_{y=\lceil n/(k+1)\rceil}^{n}\theta^{n-y}(1-\theta)^yC(n-y,y+1,k), \end{aligned}

where

C(a,b,c)=∑j=0b(−1)j(bj)(a−(c+1)j+b−1b−1).C(a,b,c)=\sum_{j=0}^{b}(-1)^j\binom{b}{j}\binom{a-(c+1)j+b-1}{b-1}.

Here C(a,b,c)C(a,b,c) equals the displayed sum if a>0a>0, equals 1 if a=0a=0, and equals 0 otherwise (see, e.g., Charalambides [12]).

Remark 3.5 Let Gn,kG_{n,k} denote the number of success runs of length at least kk in a qq-sequence, as studied by Makri and Psillakis [32]. Since

{Ln(1)≤k}={Gn,k+1=0},\left\{L_n^{(1)}\le k\right\}=\left\{G_{n,k+1}=0\right\},

we have

Pq,θ(Ln(1)≤k)=Pq,θ(Gn,k+1=0).P_{q,\theta}(L_n^{(1)}\le k)=P_{q,\theta}(G_{n,k+1}=0).

Thus, the CDF of the longest success run can also be expressed as a zero-count probability from the distribution of Gn,k+1G_{n,k+1}. The expression in Theorem 3.2 therefore provides an alternative closed-form representation of this CDF directly in terms of the longest-run statistic.

Remark 3.6 Using CDF in Theorem 3.2 an alternative expression for the rrth raw moment (alternatively the rrth uncorrected moment or the rrth moment about zero) is given by

μq(r;n;θ)=Eq,θ[(Ln(1))r]=∑j=0n−1[(j+1)r−jr][1−Pq,θ(Ln(1)≤j)],(6)\mu_q(r;n;\theta)=E_{q,\theta}\left[(L_n^{(1)})^r\right]=\sum_{j=0}^{n-1}\left[(j+1)^r-j^r\right]\left[1-P_{q,\theta}(L_n^{(1)}\le j)\right], \tag*{(6)}

which is directly computable, as nn is finite.

Numerics

Some numerics are next presented, computed by implementation of the PMF and CDF of Ln(1)L_n^{(1)} obtained in Theorems 3.1 and 3.2. Table 1 depicts the PMF Pq,θ(Ln(1)=k)P_{q,\theta}(L_n^{(1)}=k), the mean Eq,θ[Ln(1)]E_{q,\theta}[L_n^{(1)}] and variance Var⁡q,θ(Ln(1))\operatorname{Var}_{q,\theta}(L_n^{(1)}), while Table 2 depicts the CDF Pq,θ(Ln(1)≤k)P_{q,\theta}(L_n^{(1)}\le k), for n∈{3,5}n\in\{3,5\} and for the indicative values θ∈{0.25,0.75}\theta\in\{0.25,0.75\}, q∈{0.25,0.75}q\in\{0.25,0.75\}.

Table 1 PMF Pq,θ(Ln(1)=k)P_{q,\theta}(L_n^{(1)} = k), mean Eq,θ[Ln(1)]E_{q,\theta}[L_n^{(1)}] and variance Var⁡q,θ(Ln(1))\operatorname{Var}_{q,\theta}(L_n^{(1)}), for n=3,5n = 3, 5 and (θ,q)∈{0.25,0.75}2(\theta, q) \in\{0.25, 0.75\}^{2}.

nnθ\thetaqqk=0k = 0k=1k = 1k=2k = 2k=3k = 3k=4k = 4k=5k = 5Eq,θ[Ln(1)]E_{q,\theta}[L_n^{(1)}]Var⁡q,θ(Ln(1))\operatorname{Var}_{q,\theta}(L_n^{(1)})
30.250.250.69210.24240.04980.0156––0.38890.4310
30.250.750.52370.38750.07320.0156––0.58080.4837
30.750.250.19360.23510.14940.4219––1.79961.3912
30.750.750.06320.29520.21970.4219––2.00020.9700
50.250.250.68880.24480.05050.01190.00290.00100.39840.4672
50.250.750.43140.45000.09510.01870.00390.00100.71650.5711
50.750.250.19080.23050.15400.10810.07940.23732.36683.4205
50.750.750.03300.21480.24430.16650.10410.23732.80602.4158

Table 1.

Table 2 CDF Pq,θ(Ln(1)≤k)P_{q,\theta}(L_n^{(1)} \leq k), for n=3,5n = 3, 5 and (θ,q)∈{0.25,0.75}2(\theta, q) \in\{0.25, 0.75\}^{2}.

nnθ\thetaqqk=0k = 0k=1k = 1k=2k = 2k=3k = 3k=4k = 4k=5k = 5
30.250.250.69210.93460.98441.0000––
30.250.750.52370.91110.98441.0000––
30.750.250.19360.42870.57811.0000––
30.750.750.06320.35840.57811.0000––
50.250.250.68880.93360.98410.99610.99901.0000
50.250.750.43140.88140.97650.99520.99901.0000
50.750.250.19080.42120.57520.68330.76271.0000
50.750.750.03300.24770.49200.65860.76271.0000

Table 2.

The mean Eq,θ[Ln(1)]E_{q,\theta}[L_n^{(1)}] and variance Var⁡q,θ(Ln(1))\operatorname{Var}_{q,\theta}(L_n^{(1)}) are obtained using the CDF from the rr-th moment formula (6).

For instance, for n=3n=3, θ=q=0.25\theta=q=0.25, Theorem 3.1 gives P0.25,0.25(L3(1)=0)=0.6921P_{0.25,0.25}(L_3^{(1)}=0)=0.6921, P0.25,0.25(L3(1)=1)=0.2424P_{0.25,0.25}(L_3^{(1)}=1)=0.2424 and P0.25,0.25(L3(1)=2)=0.0498P_{0.25,0.25}(L_3^{(1)}=2)=0.0498 (Table 1), so that P0.25,0.25(L3(1)≤2)=0.6921+0.2424+0.0498=0.9844P_{0.25,0.25}(L_3^{(1)}\le2)=0.6921+0.2424+0.0498=0.9844, in agreement with the value obtained directly from Theorem 3.2 and reported in Table 2. Moreover, by (6) with r=1r=1,

E0.25,0.25[L3(1)]=∑k=02[1−P0.25,0.25(L3(1)≤k)]=3−(0.6921+0.9346+0.9844)=0.3889,E_{0.25,0.25}[L_3^{(1)}]=\sum_{k=0}^{2}[1-P_{0.25,0.25}(L_3^{(1)}\le k)]=3-(0.6921+0.9346+0.9844)=0.3889,

which coincides with the entry Eq,θ[L3(1)]=0.3889E_{q,\theta}[L_3^{(1)}]=0.3889 of Table 1.

The entries of Table 1 and Table 2 illustrate the effect of θ\theta, qq and nn on the distribution of Ln(1)L_n^{(1)}. For fixed qq and nn, the expected longest success run length Eq,θ[Ln(1)]E_{q,\theta}[L_n^{(1)}] increases substantially as θ\theta increases from 0.250.25 to 0.750.75, reflecting the larger mass placed on longer runs. For fixed θ\theta and nn, it also increases with qq, though less markedly than with θ\theta. For fixed θ\theta and qq, the mean increases slightly with nn, except when θ=0.75\theta=0.75, where the increase from n=3n=3 to n=5n=5 is considerable, as a longer sequence affords substantially more room for extended runs. Interestingly, Var⁡q,θ(Ln(1))\operatorname{Var}_{q,\theta}(L_n^{(1)}) does not follow the mean’s pattern uniformly in qq. For θ=0.25\theta=0.25, it increases with qq (as does the mean), whereas for θ=0.75\theta=0.75 it decreases as qq increases from 0.250.25 to 0.750.75, e.g., from 3.42053.4205 to 2.41582.4158 for n=5n=5, indicating that the higher success probability concentrates the distribution of Ln(1)L_n^{(1)} around its larger mean rather than spreading it out further.

Figure 2 and Figure 3 display the CDF and PMF of Ln(1)L_n^{(1)}, respectively, for n=3,5n=3,5 and the four combinations of θ,q∈{0.25,0.75}\theta,q\in\{0.25,0.75\} reported in Table 1 and Table 2. The plots corroborate the observations above: the CDF curves for θ=0.75\theta=0.75 lie visibly below those for θ=0.25\theta=0.25 over most of the support of Ln(1)L_n^{(1)}, indicating a stochastically larger longest success run length, and the corresponding PMF curves are shifted, and less peaked, toward larger values of kk.

Figure 2. CDF of the longest success run length Ln(1)L_n^{(1)}, for n=3,5n = 3, 5 and (θ,q)∈{0.25,0.75}2(\theta, q) \in\{0.25, 0.75\}^{2}.

Figure 3. PMF of the longest success run length Ln(1)L_n^{(1)}, for n=3,5n=3,5 and (θ,q)∈{0.25,0.75}2(\theta,q) \in\{0.25,0.75\}^2. The function is defined only at integer kk and the connecting lines serve only as visual guides.

Simulation study

In this section, the distributional results established in Theorems 3.1 and 3.2 are verified by means of a simulation study. Three aspects are investigated: the accuracy of the maximum likelihood estimator of the parameter vector (θ,q)(\theta, q), the power of the likelihood ratio test of the hypothesis H0:q=1H_0 : q = 1 against the alternative H1:q≠1H_1 : q \ne1, and the pointwise agreement between the analytical and empirical cumulative distribution functions of Ln(1)L_n^{(1)}. The study is conducted over a grid of parameter values θ∈{0.25,0.75}\theta\in\{0.25, 0.75\}, q∈{0.25,0.75,1}q \in\{0.25, 0.75, 1\}, and sequence lengths n∈{10,20}n \in\{10, 20\}, yielding twelve parameter configurations in total. For each configuration, M=1000M = 1000 independent qq-binary sequences of length nn are generated according to Algorithm 1 below, and the length of the longest success run Ln(1)L_n^{(1)} is recorded from each sequence, yielding a random sample of size N=1000N = 1000 per replicate dataset. The configurations with q∈{0.25,0.75}q \in\{0.25, 0.75\} correspond to interior parameter values, while q=1q = 1 lies at the boundary of the parameter space (0,1](0, 1], where the qq-binary model reduces to a sequence of independent and identically distributed Bernoulli trials with success probability θ\theta.

Maximum likelihood estimation

Let ℓ=(ℓ1,ℓ2,…,ℓN)\ell= (\ell_1, \ell_2, \ldots, \ell_N) be an observed random sample of longest success run lengths from a qq-binary sequence of length nn. The log-likelihood function for the parameter vector (θ,q)(\theta, q) is

L(θ,q;ℓ)=∑i=1Nlog⁡Pq,θ(Ln(1)=ℓi),(7)\mathcal{L}(\theta, q; \ell) = \sum_{i=1}^{N} \log P_{q,\theta}\left(L_n^{(1)} = \ell_i\right), \tag*{(7)}

Algorithm 1 Simulation of NN independent realisations of Ln(1)L_n^{(1)} from qq-binary trials of length nn

Require: N≥1N \ge1, n≥1n \ge1, θ∈(0,1)\theta\in(0,1), q∈(0,1]q \in(0,1]

  1. for i=1,…,Ni=1,\ldots,N do

  2. Set f←0f \leftarrow0, c←0c \leftarrow0, L←0L \leftarrow0

  3. for j=1,…,nj=1,\ldots,n do

  4. Generate U∼Uniform⁡(0,1)U \sim\operatorname{Uniform}(0,1)

  5. if U≤θqfU \le\theta q^f then

  6. Set Xj←1X_j \leftarrow1, c←c+1c \leftarrow c+1, L←max⁡(L,c)L \leftarrow\max(L,c)

  7. else

  8. Set Xj←0X_j \leftarrow0, c←0c \leftarrow0, f←f+1f \leftarrow f+1

  9. end if

  10. end for

  11. Output ℓi←L\ell_i \leftarrow L

  12. end for

where Pq,θ(Ln(1)=k)P_{q,\theta}(L_n^{(1)}=k) is given by Theorem 3.1. The maximum likelihood estimator (θ^ML,q^ML)(\hat{\theta}_{\mathrm{ML}},\hat{q}_{\mathrm{ML}}) is the value of (θ,q)(\theta,q) that maximises (7) over the parameter space (0,1)×(0,1](0,1)\times(0,1]. The evaluation of (7) requires repeated computation of Pq,θ(Ln(1)=k)P_{q,\theta}(L_n^{(1)}=k), which depends on the recursive function Uqk(r,s,t)U_q^k(r,s,t) defined in Lemma 3.1, posing numerical challenges for maximization. To reduce the number of likelihood evaluations, the maximization proceeds in two stages: a grid search over a uniform grid on (0,1)×(0,1](0,1)\times(0,1] provides an initial estimate, which is subsequently refined by the Limited-memory Broyden–Fletcher–Goldfarb–Shanno algorithm with box constraints (Byrd et al. [10]). As no closed form for the gradient of the log-likelihood is available, it is approximated numerically via finite differences with Richardson extrapolation (Burden and Faires [8]).

For the interior parameter values, (θ,q)∈(0,1)×(0,1)(\theta, q) \in(0,1) \times(0,1), the maximum likelihood estimator satisfies the standard regularity conditions and is asymptotically normally distributed (Lehmann and Casella [29]),

N((θ^MLq^ML)−(θq))→dN2(0,I(θ,q)−1),N→∞,(8)\sqrt{N}\left(\begin{pmatrix}\hat{\theta}_{\mathrm{ML}} \\ \hat{q}_{\mathrm{ML}}\end{pmatrix} - \begin{pmatrix}\theta\\ q\end{pmatrix}\right) \xrightarrow{d} \mathcal{N}_2\left(0, \mathcal{I}(\theta,q)^{-1}\right), \quad N \to\infty, \tag*{(8)}

where I(θ,q)=−E[∇2L(θ,q;ℓ)]\mathcal{I}(\theta,q)=-\mathbb{E}[\nabla^2\mathcal{L}(\theta,q;\ell)] is the expected Fisher information matrix. Asymptotic confidence intervals for θ\theta and qq are therefore constructed only for interior configurations. They are obtained from the observed Fisher information matrix J(θ^ML,q^ML)=−∇2L(θ^ML,q^ML;ℓ)\mathcal{J}(\hat{\theta}_{\mathrm{ML}},\hat{q}_{\mathrm{ML}})=-\nabla^2\mathcal{L}(\hat{\theta}_{\mathrm{ML}},\hat{q}_{\mathrm{ML}};\ell), which is a consistent estimator of I(θ,q)\mathcal{I}(\theta,q) (Lehmann and Casella [29]) and is approximated numerically via Richardson extrapolation. Specifically, the asymptotic 95% confidence interval for θ\theta is θ^ML±1.96[J(θ^ML,q^ML)−1]111/2\hat{\theta}_{\mathrm{ML}} \pm1.96[\mathcal{J}(\hat{\theta}_{\mathrm{ML}},\hat{q}_{\mathrm{ML}})^{-1}]_{11}^{1/2}, and analogously for qq, where [J(θ,q)−1]jj[\mathcal{J}(\theta,q)^{-1}]_{jj} denotes the jj-th diagonal entry of the inverse of the observed Fisher information matrix.

At the boundary q=1q=1, the standard regularity conditions for asymptotic normality are not satisfied (Lehmann and Casella [29]), but the MLE remains consistent.

The performance of the estimator is assessed over M=1000M=1000 replicate datasets for each of the twelve parameter configurations. For each configuration, we report the root mean squared error (RMSE)

RMSE⁡(θ^ML)=1M∑j=1M(θ^ML(j)−θ)2.\operatorname{RMSE}(\hat{\theta}_{\mathrm{ML}})=\sqrt{\frac{1}{M}\sum_{j=1}^{M}\left(\hat{\theta}_{\mathrm{ML}}^{(j)}-\theta\right)^2}.

For the configurations in the interior of the parameter space, the empirical coverage of the asymptotic 95% confidence interval is also reported. The same quantities are computed for q^ML\hat{q}_{\mathrm{ML}}. The results are presented in Table 3 and illustrated in the scatter plots of Figure 4.

Figure 4. Joint distribution of the maximum likelihood estimates (θ^ML,q^ML)(\hat{\theta}_{ML},\hat{q}_{ML}) across 1000 replicate datasets, each consisting of 1000 longest success run lengths recorded from simulated qq-binary sequences of length nn. Top: n=10n = 10; bottom: n=20n = 20. True parameter values are indicated by the cross markers

nnθ\thetaqqRMSE⁡(θ^ML)\operatorname{RMSE}(\hat{\theta}_{ML})RMSE⁡(q^ML)\operatorname{RMSE}(\hat{q}_{ML})Asymp. 95% CI coverage (θ^ML)(\hat{\theta}_{ML})Asymp. 95% CI coverage (q^ML)(\hat{q}_{ML})
100.250.250.01620.06640.9620.95
100.250.750.01930.03120.9410.943
100.2510.01590.0169––
100.750.250.006970.04090.9560.947
100.750.750.007770.01460.9490.949
100.7510.00670.0059––
200.250.250.01730.07010.9470.937
200.250.750.01640.02210.9520.951
200.2510.01750.0097––
200.750.250.006840.04170.9540.949
200.750.750.007450.01360.9550.934
200.7510.00670.0035––

Table 3. Root mean squared error of θ^ML\hat{\theta}_{ML} and q^ML\hat{q}_{ML} and empirical coverage of the asymptotic 95% confidence intervals across M=1000M = 1000 replicate datasets, each consisting of N=1000N = 1000 longest success run lengths recorded from simulated qq-binary sequences of length nn, for n∈{10,20}n \in\{10, 20\}, θ∈{0.25,0.75}\theta\in\{0.25, 0.75\}, and q∈{0.25,0.75,1}q \in\{0.25, 0.75, 1\}. Dashes indicate that asymptotic confidence intervals are not constructed at the boundary q=1q = 1.

The entries of Table 3 show that RMSE is small throughout, including at the boundary q=1q=1, confirming consistency of the MLE across all configurations. For the interior configurations, θ^ML\hat{\theta}_{\mathrm{ML}} is consistently more precise than q^ML\hat{q}_{\mathrm{ML}}, with the discrepancy most pronounced at q=0.25q=0.25. This reflects the fact that strong geometric decay in the success probability is harder to distinguish from moderate decay on the basis of the longest run alone. The empirical coverage of the asymptotic 95% confidence intervals is close to the nominal level for both parameters across all interior configurations. As asymptotic normality holds in the limit N→∞N \to\infty for interior parameter values, the coverage is not expected to be exact at any finite NN. The results confirm that at N=1000N=1000 the normal approximation is adequate. These findings are corroborated by Figure 4, which displays the joint distribution of (θ^ML,q^ML)(\hat{\theta}_{\mathrm{ML}},\hat{q}_{\mathrm{ML}}) across replicates.

For the interior configurations, the estimates are centred near the true values in all panels, with the spread along the q^ML\hat{q}_{ML} axis visibly wider than along the θ^ML\hat{\theta}_{ML} axis, and the approximately elliptical shape of the point clouds is consistent with the bivariate normal limiting distribution established in (8). For the boundary configurations q=1q = 1, the estimates of q^ML\hat{q}_{ML} accumulate near the upper boundary of the parameter space, producing the asymmetric, non-elliptical point clouds visible in the rightmost column of Figure 4, as expected when the true parameter lies on the boundary.

Likelihood ratio test of H0:q=1H_0 : q = 1

A natural question in practice is whether the observed longest success run lengths are consistent with a standard sequence of independent and identically distributed Bernoulli trials, or whether the geometric variation in the success probability characteristic of the qq-binary model is supported by the data. This is formalized as the hypothesis testing problem

H0:q=1againstH1:q≠1,H_0 : q = 1 \qquad\text{against} \qquad H_1 : q \ne1,

where under H0H_0 the qq-binary model reduces to a sequence of IID Bernoulli trials with success probability θ\theta, which remains a free nuisance parameter. The likelihood ratio test statistic is

Λ=2[L(θ^ML,q^ML;ℓ)−L(θ^0,1;ℓ)]\Lambda= 2\left[\mathcal{L}(\hat{\theta}_{ML}, \hat{q}_{ML}; \ell) - \mathcal{L}(\hat{\theta}_0, 1; \ell)\right]

where θ^0=arg⁡max⁡θL(θ,1;ℓ)\hat{\theta}_0 = \arg\max_{\theta} \mathcal{L}(\theta, 1; \ell) is the restricted maximum likelihood estimator of θ\theta under H0H_0, obtained by maximizing the log-likelihood with qq fixed at 1.

Because q=1q = 1 lies on the boundary of the parameter space (0,1](0, 1], the likelihood ratio Λ\Lambda does not asymptotically follow a chi-squared distribution with degree 1, denoted as χ12\chi_1^2, under H0H_0 as N→∞N \to\infty [42]. Instead, the null distribution of Λ\Lambda is the equal-weight mixture

Λ⟶d12χ02+12χ12,N→∞,\Lambda\mathrel{\mathop{\longrightarrow}^{d}} \frac{1}{2}\chi_0^2+\frac{1}{2}\chi_1^2,\quad N\to\infty,

where χ02\chi_0^2 denotes a point mass at zero. The boundary-corrected pp-value is accordingly

p=12P(χ12>Λ)for Λ>0,p=\frac{1}{2}P\left(\chi_1^2>\Lambda\right)\quad\text{for }\Lambda>0,

and H0H_0 is rejected at the nominal level α=0.05\alpha=0.05 when p<0.05p<0.05, which is equivalent to using the χ12\chi_1^2 critical value at level 2α=0.102\alpha=0.10.

The power of the test is examined across the eight interior configurations with q∈{0.25,0.75}q\in\{0.25,0.75\}, and the empirical size is verified at the four boundary configurations with q=1q=1. The results are summarized in Table 4, which reports the mean and standard deviation of Λ\Lambda, the mean and maximum boundary-corrected pp-value, and the rejection rate across M=1000M=1000 replicates.

nnθ\thetaqqMean Λ\LambdaSD(Λ\Lambda)Mean pp-valueMax pp-valueRejection rate
100.250.25165.934.08.93⋅10−228.93\cdot10^{-22}5.49⋅10−195.49\cdot10^{-19}1
100.250.7550.416.39.39⋅10−79.39\cdot10^{-7}3.91⋅10−43.91\cdot10^{-4}1
100.2510.410.63810.043
100.750.252208.4159.3001
100.750.75571.7102.83.16⋅10−603.16\cdot10^{-60}3.01⋅10−573.01\cdot10^{-57}1
100.7510.51.10.62810.044
200.250.25255.2105.90.01110.989
200.250.75136.884.60.05710.942
200.2510.31.10.69810.041
200.750.253552.5253.0001
200.750.751112.3165.67.72⋅10−1457.72\cdot10^{-145}7.68⋅10−1427.68\cdot10^{-142}1
200.7510.51.10.64010.048

Table 4. Summary of the likelihood ratio test of H0:q=1H_0:q=1 against H1:q≠1H_1:q\ne1 across M=1000M=1000 replicate datasets, each consisting of N=1000N=1000 longest success run lengths recorded from simulated qq-binary sequences of length nn, for n∈{10,20}n\in\{10,20\}, θ∈{0.25,0.75}\theta\in\{0.25,0.75\}, and q∈{0.25,0.75,1}q\in\{0.25,0.75,1\}. pp-values are boundary-corrected following Self and Liang [42]. Size rows correspond to q=1q=1; power rows correspond to q<1q<1. Rejection is at the nominal level α=0.05\alpha=0.05

The empirical rejection rates at q=1q=1 are 0.043, 0.044, 0.041, and 0.048 across the four null configurations, all close to the nominal level of 0.05, confirming that the boundary-corrected test is well calibrated. For the interior configurations, the test achieves high power throughout, with rejection rates between 0.94 and 1. Overall, the results confirm that the likelihood ratio test based on the probability mass function established in Theorem 3.1 is correctly sized under H0H_0 and achieves high power against H1:q≠1H_1:q\ne1, as expected.

Comparison of analytical and empirical cumulative distribution functions

The cumulative distribution function established in Theorem 3.2 is assessed by comparing it pointwise against the empirical cumulative distribution function of Ln(1)L_n^{(1)} constructed from the pooled sample of N⋅M=106N \cdot M = 10^6 observations for each of the twelve parameter configurations. Let F0(k;q,θ)=Pq,θ(Ln(1)≤k)F_0(k;q,\theta) = P_{q,\theta}(L_n^{(1)} \le k) denote the analytical CDF given by Theorem 3.2 and FN(k)=(NM)−1∑i=1NM1(Ln,i(1)≤k)F_N(k) = (NM)^{-1} \sum_{i=1}^{NM} 1(L_{n,i}^{(1)} \le k) the corresponding empirical CDF. Since the support of Ln(1)L_n^{(1)} is the finite set {0,1,…,n}\{0,1,\ldots,n\}, pointwise convergence of FN(k)F_N(k) to F0(k;q,θ)F_0(k;q,\theta) at each kk is equivalent to uniform convergence, and the Kolmogorov-Smirnov statistic

D=sup⁡k∈{0,…,n}∣FN(k)−F0(k;q,θ)∣D = \sup_{k \in\{0,\ldots,n\}} \left|F_N(k)-F_0(k;q,\theta)\right|

therefore reduces to a maximum over finitely many points. As the Kolmogorov-Smirnov statistic is not distribution-free for discrete distributions, DD is reported as a descriptive measure of the maximum pointwise discrepancy only, without performing the Kolmogorov-Smirnov test of equality of CDFs.

Instead, formal inference is based on exact two-sided binomial tests. Let G(k)=P(Ln(1)≤k)G(k) = P(L_n^{(1)} \le k) denote the true cumulative distribution function of Ln(1)L_n^{(1)}. The pointwise hypothesis

H0(k):G(k)=F0(k;q,θ)againstH1(k):G(k)≠F0(k;q,θ)(9)H_0^{(k)}: G(k) = F_0(k;q,\theta) \quad\text{against} \quad H_1^{(k)}: G(k) \ne F_0(k;q,\theta) \tag*{(9)}

is examined for each interior support point k∈{0,1,…,n−1}k \in\{0,1,\ldots,n-1\}. Under H0(k)H_0^{(k)}, each observation Ln,i(1)L_{n,i}^{(1)} for i=1,…,NMi=1,\ldots,NM satisfies P(Ln,i(1)≤k)=F0(k;q,θ)P(L_{n,i}^{(1)} \le k) = F_0(k;q,\theta), so the indicators 1(Ln,i(1)≤k)1(L_{n,i}^{(1)} \le k) are independent Bernoulli random variables with success probability F0(k;q,θ)F_0(k;q,\theta). Consequently, the count

Sk=∑i=1NM1(Ln,i(1)≤k)S_k = \sum_{i=1}^{NM} 1\left(L_{n,i}^{(1)} \le k\right)

follows a binomial distribution with parameters NMNM and F0(k;q,θ)F_0(k;q,\theta) under H0(k)H_0^{(k)}, from which an exact two-sided pp-value is obtained. The point k=nk=n is excluded as Pq,θ(Ln(1)≤n)=1P_{q,\theta}(L_n^{(1)} \le n)=1 holds trivially for any distribution on {0,…,n}\{0,\ldots,n\}. Because nn hypotheses of the form (4.3) are tested simultaneously on the same pooled sample, the tests are not mutually independent. The Bonferroni correction controls the family-wise error rate at level α=0.05\alpha=0.05 without requiring independence of the individual tests ([31]), and the family-wise rejection threshold for each individual test is accordingly α/n\alpha/n with α=0.05\alpha=0.05.

The results are presented in Table 5 and the analytical and empirical CDFs are displayed in Figure 5. The null hypothesis H0(k)H_0^{(k)} is not rejected at any support point in any of the twelve configurations. The values of DD are of order 10−410^{-4} to 10−310^{-3} throughout, reflecting negligible pointwise discrepancy between the analytical and empirical CDFs at the pooled sample size of 10610^6. These results confirm the correctness of the cumulative distribution function established in Theorem 3.2 across all parameter configurations considered.

nnθ\thetaqqBonferroni threshold (α/n\alpha/n)Min pp-valueDD
100.250.250.00500.00832.90⋅10−42.90 \cdot10^{-4}
100.250.750.00500.03739.99⋅10−49.99 \cdot10^{-4}
100.2510.00500.20713.07⋅10−43.07 \cdot10^{-4}
100.750.250.00500.04728.45⋅10−48.45 \cdot10^{-4}
100.750.750.00500.41982.84⋅10−42.84 \cdot10^{-4}
100.7510.00500.27653.39⋅10−43.39 \cdot10^{-4}
200.250.250.00250.05602.23⋅10−42.23 \cdot10^{-4}
200.250.750.00250.16834.18⋅10−44.18 \cdot10^{-4}
200.2510.00250.00421.15⋅10−31.15 \cdot10^{-3}
200.750.250.00250.01737.21⋅10−47.21 \cdot10^{-4}
200.750.750.00250.08187.92⋅10−47.92 \cdot10^{-4}
200.7510.00250.11125.87⋅10−45.87 \cdot10^{-4}

Table 5. Bonferroni-corrected exact binomial test results and maximum pointwise discrepancy D=sup⁡k∣FN(k)−F0(k;q,θ)∣D = \sup_k \lvert F_N(k) - F_0(k;q,\theta)\rvert between the empirical CDF constructed from NM=106NM = 10^6 observations and the analytical CDF of Theorem 3.2, for n∈{10,20}n \in\{10,20\}, θ∈{0.25,0.75}\theta\in\{0.25,0.75\}, and q∈{0.25,0.75,1}q \in\{0.25,0.75,1\}. The null hypothesis is not rejected in any configuration at α=0.05\alpha= 0.05.

Figure 5. Analytical (blue, hollow) and empirical (red, solid) cumulative distribution functions of Ln(1)L_n^{(1)} for n=10n = 10 (top) and n=20n = 20 (bottom), constructed from NM=106NM = 10^6 observations per configuration. The two functions are visually indistinguishable in all panels

Discussion

In the present work, we introduce and study the distribution of the length of the longest success run for qq-binary trials. We have obtained the exact expression for the PMF of the random variable Ln(1)L_n^{(1)} which follows a q−Ln(1)(θ)q-L_n^{(1)}(\theta) distribution. More specifically, we derive the exact expression for the PMF Pq,θ(Ln(1)=k)P_{q,\theta}\left(L_n^{(1)}=k\right), representing the distribution of the length Ln(1)L_n^{(1)} of the longest success run and the cumulative distribution function Pq,θ(Ln(1)≤k)P_{q,\theta}\left(L_n^{(1)}\leq k\right) for Ln(1)L_n^{(1)} through enumerative combinatorics. These theoretical results are further validated by a simulation study, which confirms the accuracy of maximum likelihood estimation of (θ,q)(\theta,q), the correct size and high power of a boundary-corrected likelihood ratio test of H0:q=1H_0:q=1, and close agreement between the derived analytical cumulative distribution function of Ln(1)L_n^{(1)} and its empirical counterpart.

Another random variable that is closely associated with Ln(1)L_n^{(1)} is the TkT_k, which represents the waiting time until the first occurrence of a sequence of kk consecutive successes. In the context of a qq-geometric model, the distribution of the TkT_k is referred to as qq-geometric distribution of order kk, can be denoted as q−Tk(θ)q-T_k(\theta). Given that the event {Ln(1)<k}\{L_n^{(1)}<k\} is equivalent to {Tk>n}\{T_k>n\}, we can directly establish the following

relationship

Pq,θ(Ln(1)<k)=Pq,θ(Tk>n).(10)P_{q,\theta}\left(L_n^{(1)} < k\right) = P_{q,\theta}\left(T_k > n\right). \tag*{(10)}

This relationship provides straightforward methods for determining the exact distribution (probability mass function) of TkT_k by utilizing the formulae derived in this study for the longest run Ln(1)L_n^{(1)}. The probability of the event {Tk=n}\{T_k = n\} can be expressed as follows.

Pq,θ(Tk=n)=Pq,θ(Tk>n−1)−Pq,θ(Tk>n).P_{q,\theta}\left(T_k = n\right) = P_{q,\theta}\left(T_k > n-1\right) - P_{q,\theta}\left(T_k > n\right).

Using dual relationship (10), we can rewrite as follows.

Pq,θ(Tk=n)=Pq,θ(Ln−1(1)<k)−Pq,θ(Ln(1)<k).P_{q,\theta}\left(T_k = n\right) = P_{q,\theta}\left(L_{n-1}^{(1)} < k\right) - P_{q,\theta}\left(L_n^{(1)} < k\right).

Using simple mathematical algebra arguments, we can rewrite as follows.

Pq,θ(Tk=n)=Pq,θ(Ln−1(1)≤k−1)−Pq,θ(Ln(1)≤k−1).(11)P_{q,\theta}\left(T_k = n\right) = P_{q,\theta}\left(L_{n-1}^{(1)} \le k-1\right) - P_{q,\theta}\left(L_n^{(1)} \le k-1\right). \tag*{(11)}

Using Formula (11) and Theorem 3.2, we can compute the PMF for a qq-geometric distribution of order kk. Alternatively, we can compute the PMF values for the qq-geometric distribution of order kk using the formulae derived by Yalcin and Eryilmaz [44] in a manner similar to that used in Theorem 3.2.

As a possible direction for future research, one could consider deriving the recursive expressions for the PMF of the RV TkT_k. The preliminary results from the investigation of this RV are promising. To give a specific example, the PMF of TkT_k, fq(x;θ)=Pq,θ(Tk=x)f_q(x;\theta) = P_{q,\theta}(T_k = x), x=k,k+1,…x = k, k+1,\ldots satisfies for x≥k+1x \ge k+1 the recursive scheme

fq(x;θ)=∑i=1kθi−1(1−θ)fq(x−i;θq), andf_q(x;\theta) = \sum_{i=1}^{k}\theta^{i-1}(1-\theta)f_q(x-i;\theta q),\ \text{and}
fq(k;θ)=θk, for x=k, andf_q(k;\theta) = \theta^k,\ \text{for }x=k,\ \text{and}
fq(x;θ)=0, for x<k.f_q(x;\theta) = 0,\ \text{for }x<k.

Acknowledgements

Acknowledgements. The authors would like to thank Dr. habil. Tommy Rene Jensen, whose comments led to significant improvements in this manuscript. The authors would like to thank Professor Frosso S. Makri for drawing our attention to the connection between the longest success run and the number of success runs exceeding a fixed threshold.

Declarations

  • Funding This work was supported by the Ministry of Education of the Republic of Korea and the National Research Foundation of Korea.(NRF-2025S1A5B5A16008020)

  • Conflict of interest The authors have no competing interests to declare that are relevant to the content of this article.

  • Ethics approval Not applicable.

  • Consent to participate Not applicable.

  • Consent for publication Not applicable.

  • Data availability No external datasets were used. The numerical results are based on simulated qq-binary sequences generated as described in the simulation study.

  • Materials availability Not applicable.

  • Code availability Computational code used to evaluate the derived formulae and to run the simulation study will be made available in a public repository upon acceptance of the manuscript.

  • Author contribution Jungtaek Oh: conceptualization, methodology, theoretical derivation, writing (original draft), review and editing. Nurzhan Sapargali: simulation study, numerical experiments, review and editing. Both authors read and approved the final manuscript.

References

  1. [1]Aki, S., Kuboki, H., Hirano, K.: On discrete distributions of order k. Annals of the Institute of Statistical Mathematics 36(1), 431–440 (1984)
  2. [2]Aki, S.: Waiting time for consecutive repetitions of a pattern and related distributions. Annals of the Institute of Statistical Mathematics 71(2), 307–325 (2019)DOI
  3. [3]Arapis, A.N., Makri, F.S., Psillakis, Z.M.: Distributions of statistics describing concentration of runs in non homogeneous markov-dependent trials. Communications in Statistics-Theory and Methods 47(9), 2238–2250 (2018)DOI
  4. [4]Antzoulakos, D.L., Philippou, A.N.: Probability distribution functions of succession quotas in the case of markov dependent trials. Annals of the Institute of Statistical Mathematics 49(3), 531–539 (1997)DOI
  5. [5]Antzoulakos, D.L., Philippou, A.N.: Longest success and failure runs and new polynomials related to the fibonacci-type polynomials of order k. In: Bergum, G.E., Philippou, A.N., Horadam, A.F. (eds.) Applications of Fibonacci Numbers: Volume 7, pp. 29–38. Springer, Dordrecht (1998). https://doi.org/10.1007/978-94-011-5020-0_5 . https://doi.org/10.1007/978-94-011-5020-0_5
  6. [6]Balakrishnan, N., Balasubramanian, K., Viveros, R.: Note: start-up demonstration tests under correlation and corrective action. Naval Research Logistics 42(8), 1271–1276 (1995)
  7. [7]Burr, E., Cane, G.: Longest run of consecutive observations having a specified attribute. Biometrika 48(3/4), 461–465 (1961)DOI
  8. [8]Burden, R.L., Faires, J.D.: Numerical Analysis, 9th edn. Thomson Brooks/Cole Cengage Learning, Belmont, CA (2011)
  9. [9]Balakrishnan, N., Koutras, M.V.: Runs and Scans with Applications. Wiley, New York (2002)
  10. [10]Byrd, R.H., Lu, P., Nocedal, J., Zhu, C.: A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing 16(5), 1190–1208 (1995)
  11. [11]Charalambides, C.A.: Success runs in a circular sequence of independent bernoulli trials. Runs and patterns in probability, 15–30 (1994)DOI
  12. [12]Charalambides, C.A.: Enumerative Combinatorics. CRC Press, Boca Raton, FL (2002)
  13. [13]Charalambides, C.A.: Discrete q-distributions on bernoulli trials with a geometrically varying success probability. Journal of statistical planning and inference 140(9), 2355–2383 (2010)DOI
  14. [14]Charalambides, C.A.: The q-bernstein basis as a q-binomial distribution. Journal of Statistical Planning and Inference 140(8), 2184–2190 (2010)DOI
  15. [15]Charalambides, C.A.: Discrete q-distributions. John Wiley & Sons, Hoboken, NJ (2016)
  16. [16]Dubman, M., Sherman, B.: Estimation of parameters in a transient markov chain arising in a reliability growth model. The Annals of Mathematical Statistics 40(5), 1542–1556 (1969)DOI
  17. [17]Eryilmaz, S.: The longest run statistic associated with exchangeable binary variables. Turkish Journal of Engineering and Environmental Sciences 29(2), 105–112 (2005)
  18. [18]Eryilmaz, S.: Some results associated with the longest run statistic in a sequence of markov dependent trials. Applied mathematics and computation 175(1), 119–130 (2006)DOI
  19. [19]Eryilmaz, S.: On success runs in a sequence of dependent trials with a change point. Statistics & Probability Letters 132, 91–98 (2018)DOI
  20. [22]Fu, J.C.: Distribution theory of runs and patterns associated with a sequence of multistate trials. Statistica Sinica, 957–974 (1996)
  21. [23]Gera, A.E.: Acceptance testing for a planar array. Communications in Statistics - Simulation and Computation 49(5), 1198–1209 (2020) https://doi.org/10.1080/ 03610918.2018.1493506
  22. [24]Gera, A.E.: From runs to patterns. Communications in Statistics - Simulation and Computation 50(12), 4300–4314 (2021) https://doi.org/10.1080/03610918.2019.1642486
  23. [25]Jing, S.-c., Fan, H.-y.: q-deformed binomial state. Physical Review A 49(4), 2277 (1994)pubmed.ncbi.nlm.nih.gov/9910495
  24. [26]Jing, S.: The q-deformed binomial distribution and its asymptotic behaviour. Journal of Physics A: Mathematical and General 27(2), 493 (1994)DOI
  25. [27]Johnson, N.L., Kotz, S., Kemp, A.W.: Univariate Discrete Distributions. John Wiley & Sons, Hoboken, NJ (2005)
  26. [28]Kong, Y.: Joint distribution of rises, falls, and number of runs in random sequences. Communications in Statistics-Theory and Methods 48(3), 493–499 (2019)DOI
  27. [29]Lehmann, E.L., Casella, G.: Theory of Point Estimation. Springer, New York (1998)
  28. [30]Lou, W.W.: On runs and longest run tests: a method of finite markov chain imbedding. Journal of the American Statistical Association 91(436), 1595–1601 (1996)DOI
  29. [31]Lehmann, E.L., Romano, J.P.: Testing Statistical Hypotheses, 4th edn. Springer, Cham (2022)
  30. [32]Makri, F.S., Psillakis, Z.M.: On runs of ones defined on a q-sequence of binary trials. Metrika 79(5), 579–602 (2016) https://doi.org/10.1007/s00184-015-0568-2
  31. [33]Makri, F.S., Psillakis, Z.M., Arapis, A.N.: On the concentration of runs of ones of length exceeding a threshold in a markov chain. Journal of Applied Statistics 46(1), 85–100 (2019)DOI
  32. [34]Makri, F.S., Philippou, A.N., Psillakis, Z.M.: Shortest and longest length of success runs in binary sequences. Journal of Statistical Planning and Inference 137(7), 2226–2239 (2007)DOI
  33. [35]Muselli, M.: Simple expressions for success run distributions in bernoulli trials. Statistics & Probability Letters 31(2), 121–128 (1996)DOI
  34. [36]Philippou, A.N., Georghiou, C., Philippou, G.N.: A generalized geometric distribution and some of its properties. Statistics & Probability Letters 1(4), 171–175 (1983)
  35. [37]Philippou, A., Muwafi, A.: Waiting for the kth consecutive success and the fibonacci sequence of order k. Fibonacci Quarterly 20(1), 28–32 (1982)DOI
  36. [38]Philippou, A.N., Makri, F.S.: Longest success runs and fibonacci-type polynomials. The Fibonacci Quarterly 23(4), 338–346 (1985)DOI
  37. [39]Philippou, A.N., Makri, F.S.: Successes, runs and longest runs. Statistics & Probability Letters 4(2), 101–105 (1986)
  38. [40]Philippou, A.N., Makri, F.S.: Longest circular runs with an application in reliability via the fibonacci-type polynomials of order k. In: Bergum, G.E., Philippou, A.N., Horadam, A.F. (eds.) Applications of Fibonacci Numbers: Volume 3 Proceedings of ‘The Third International Conference on Fibonacci Numbers and Their Applications’, Pisa, Italy, July 25–29, 1988, pp. 281–286. Springer, Dordrecht (1990). https://doi.org/10.1007/978-94-009-1910-5_31 . https://doi.org/10.1007/978-94-009-1910-5_31
  39. [41]Serkan, E.: On the distribution and expectation of success runs in nonhomogeneous markov dependent trials. Statistical Papers 46(1), 117–128 (2005)DOI
  40. [42]Self, S.G., Liang, K.-Y.: Asymptotic properties of maximum likelihood estimators and likelihood ratio tests under nonstandard conditions. Journal of the American Statistical Association 82(398), 605–610 (1987) https://doi.org/10.1080/01621459.1987.10478472
  41. [43]Vaggelatou, E.: On the length of the longest run in a multi-state markov chain. Statistics & probability letters 62(3), 211–221 (2003)DOI
  42. [44]Yalcin, F., Ervilmaz, S.: q-geometric and q-binomial distributions of order k. Journal of Computational and Applied Mathematics 271, 31–38 (2014)DOI

Paper details

vlnc:W_36bkyr9f
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents