We examine two stochastic models for consistency with observed long-term secular trends in sunspot number and a faint, but semi-persistent, 22-yr signal: (1) a null hypothesis, a simple one-parameter log-normal random-walk model of sunspot-number cycle-to-cycle change, and, (2) an alternative hypothesis, a two-parameter random-walk model with an imposed 22-yr alternating amplitude. The observed secular trend in sunspots, seen from solar cycle 5 to 23, would not be an unlikely result of the accumulation of multiple random-walk steps. Statistical tests show that a 22-yr signal can be resolved in historical sunspot data; that is, the probability is low that it would be realized from random data. On the other hand, the 22-yr signal has a small amplitude compared to random variation, and so it has a relatively small effect on sunspot predictions. Many published predictions for cycle 24 sunspots fall within the dispersion of previous cycle-to-cycle sunspot differences. The probability is low that the Sun will, with the accumulation of random steps over the next few cycles, walk down to a Dalton-like minimum. Our models support published interpretations of sunspot secular variation and 22-yr variation resulting from cycle-to-cycle accumulation of dynamo-generated magnetic energy.
 Solar-cycle waxing and waning of sunspots is a manifestation of the Sun's 22-yr dynamo cycle and the oscillatory exchange of energy between toroidal and poloidal magnetic field ingredients [Babcock, 1961; Leighton, 1969]. At 11-yr solar maximum, the poloidal axial-dipole field is near its dynamo-cycle minimum strength, but the internal toroidal quadrupolar field is near its maximum strength. Buoyant emergence of toroidal field through the surface gives sunspots. During the solar cycle's declining phase, energy shifts from the toroidal to the poloidal field, and sunspots diminish in number. At solar-cycle minimum, the toroidal field is at minimum strength, sunspots are rare, and the poloidal field is at maximum strength. With the commencement and rise of the next 11-yr cycle, energy shifts back from the poloidal to the toroidal field, but with a polarity that is opposite to the previous cycle. The process carries on from there, and in an idealized and symmetrical scenario, each 11-yr cycle corresponding to a change in magnetic polarity field,B → −B, with a sequential pair of solar cycles representing a complete 22-yr dynamo cycle. Because the dynamo's magnetohydrodynamic equations are invariant under change in sign of the field, one might reasonably expect that the behavior of the solar dynamo for one polarity should be like that for the next, and that the statistics of sunspots should be independent of solar-cycle number.
 Of course, reality is not so simple. While astronomers might choose to identify the beginning and end of each solar cycle according to the number of sunspots, each solar cycle does not actually represent a perfect change in sign of the magnetic field. Residual field from one solar cycle affects the dynamical growth and evolution of the magnetic field of the next. The time dependence of the solar dynamo is not simply sinusoidal, it is somewhat aperiodic, and dynamo action for each solar cycle can either build upon or destroy residual magnetic field left over from the previous cycle, leading to secular drift in solar-cycle-maximum sunspot numbers [Solanki et al., 2002]. Cycle-to-cycle magnetic “memory” might also be responsible for a weak but semi-persistent 22-yr polarity-bias in sunspots [e.g.,Charbonneau et al., 2007], first noticed over a century ago by Wolf : greater (fewer) sunspots are seen for odd (even) numbered cycles.
 Quantification of sunspot-number time dependence is important for several reasons: for facilitating comparisons with dynamo theory [e.g.,Weiss and Thompson, 2009; Charbonneau, 2010], for predicting future solar-cycle amplitude [e.g.,Petrovay, 2010] and related space-weather conditions [e.g.,Hathaway and Wilson, 2004; Barnard et al., 2011], and for analyzing long-term change in interplanetary conditions [e.g.,Lockwood et al., 1999], geomagnetic activity [e.g., Cliver et al., 1996], and the Earth's climate [e.g., Gray et al., 2010]. In recognition of the Sun's natural complexity, and the practical difficulty in constructing accurate deterministic physics-based models of the solar dynamo, some researchers have pursued empirical autoregressive modeling of intra-cycle (<11 yr) sunspot variation [e.g.,Barnes et al., 1980; Brajša et al., 2009]. Here, we examine simple random-walk models of longer-term (>11 yr) change in sunspot number, including cycle-to-cycle differences, 22-yr variation, and secular variation.
2. Sunspot Time Series
 We use monthly values of sunspot group numbers G [Hoyt and Schatten, 1998] and (Wolf) international sunspot numbers Z [Clette et al., 2007], each for years 1799–2011, cycles 5–23, and obtained from NOAA's National Geophysical Data Center. Group numbers are generally considered to be an improvement over international numbers, especially before cycle 13 [e.g., Vaquero, 2007]. Therefore, in what follows, we emphasize results for G; results for Z are similar and these are given in the auxiliary material. We do not use sunspot numbers before 1799 because of the relative sparsity of observations. In Figure 1a we see that the Gtime series records both the familiar solar-cycle modulation and long-term secular variation in modulation amplitude. Note, for example, the relative low in solar-cycle maxima for cycles 5 and 6, the “Dalton” minimum, followed by an increase in maxima and relative stability from cycles 7 to 14, then followed by another increase to what is sometimes called the “modern maximum”, with cycle 19 having a prominent high in sunspot number, but with cycle 20 being much lower. Overall, there are significant cycle-to-cycle differences in maxima, and a slight amount anticorrelation between maximum number and the minimum-to-minimum duration for each cycle [Waldmeier, 1935]. A faint 22-yr variation is seen in the alternating amplitude of cycles 11–17; otherwise, for other periods, it is less obvious, and sometimes it appears to be missing.
 We analyze (1) the maximum annual-averages of sunspot numbers within each cycle and (2) the sum of monthly sunspot numbers across each cycle,
where Gjm is the group number for month m within cycle number j.In the first quantity, the sum is taken over the calendar year with the greatest average number of sunspots within a cycle. In the second quantity, the sum is taken across the entire duration of each cycle. Results for solar-cycle sums are almost always similar to those for maxima, but where they are not, we will note the differences.
3. The Solar Dynamo
 Time dependence of the Sun's magnetic field B results from a combination of diffusion, parameterized by diffusivity η, turbulent induction, parameterized by a “mean-field” scalarα, and induction driven by large-scale fluid motionu,
[e.g., Krause and Rädler, 1980]. This equation suggests that the evolution of the intensity of the main part of solar magnetic field ∂tBcan be represented by an iterative time-step mapping,Bj−1 → Bj. In particular, if (η, α, u) are prescribed, then the pattern of fluid motion is independent of the magnetic field, u ≠ u(B), and we have “kinematic” dynamo action [e.g., Gubbins, 1974]. Here, the driven evolution of the magnetic field can be followed by linear time stepping,
where, with each iteration, the magnetic intensity can be an amplification (or deamplification) of the field intensity of the previous step. A more complete simulation would include nonlinear dynamics, whereby the magnetic field partially affects the form of turbulence and large-scale fluid motion,u = u(B), which we represent by the functional
Depending on the details of f, a wide variety of time dependence can result, including oscillatory variation, chaos [e.g., Jones et al., 1985], and what is most interesting for our purposes, time-dependence with bias that can persist across multiple polarity oscillations [e.g.,Charbonneau et al., 2007].
4. A Normal Random-Walk Model
 Sunspot number is not, perhaps, simply proportional to the intensity of the main part of solar magnetic field. Still, the preceding theory does provide qualitative motivation for an idealized model in which the number of sunspots for one cycle Rj−1 is related to the number in the next Rjthrough a stochastic process prescribed by a positive-definite probability density function ,
where the ratio ρj(R) represents cycle-to-cycle relative change. The density is not a function of sunspot number; it is analogous to the dynamo function (3)with no magnetic-field dependence,f = f(η, α, u). With a logarithmic transformation,
where δj(S) denotes the cycle-to-cycle, step-change differenceSj − Sj−1, and where is the transformation of the probability density function obtained by a formal change of variables. Equation (8)describes a stationary random-walk process [e.g.,Chandrasekhar, 1943], with each step being a statistical realization from . Log-maxSj are shown in Figure 1b and corresponding first differences δj in Figure 1c; similar figures for log-sums are in theauxiliary material. Statistical results for both log-max and log-sum differences, cycles 5–23, are listed inTable 1.
Table 1. Summary of Statistics for Cycle-To-Cycle Differences in Sunspot Group Numbera
Pure random-walk results are forβ= 0; alternating random-walk results are for indicatedβ values.
 As a null hypothesis [e.g., Stuart et al., 1999, chap. 20], we test, for possible rejection, a model in which is zero-mean normal. We note that the meansμof log-max and log-sum differencesδj are much smaller than the standard deviations σ that we calculate for the δjwith respect to a zero mean. For example, the log-max mean is 0.0471, but the standard deviation is 0.3930. The assumption of normality,
is appealing by virtue of the central limit theorem and the averaging that is taken over the spatial and temporal complexity of turbulence to obtain equation (2). We can evaluate the normality of the data with the Kuiper test, a robust version of the Kolmogorov-Smirnov test [Press et al., 1992, chap. 14.3]. For log-max, the Kuiper measure of the deviation between the cumulative of theδj and is DK = 0.27. The probability that a statistic at least this size could arise from a random sampling of is pK = 0.5284, which is not low. Therefore, we cannot confidently reject a model with cycle-to-cycle differences in sunspot log-max having zero-mean normal distribution.
 Randomness is, however, different from distribution, and yet cycle-to-cycle randomness, or the lack thereof, is central to our analysis. The Pearson lag-one autocorrelation [Press et al., 1992, chap. 14.5] for log-max differencesδj is r1 = −0.49, indicating a modest cycle-to-cycle anticorrelation. The probability that anticorrelation of at least this amplitude could arise from random normal data ispr = 0.0043, which is low. This can be interpreted as evidence of a 22-yr signal in sunspots, but we hesitate to automatically declare the measured anticorrelation to be statistically “significant”. Why? Because we perceived the presence of a 22-yr signal before we calculated sunspot autocorrelation, so what we obtained is, technically, just a “confirmation bias” of that perception [e.g.,Feynman, 1998, pp. 80–81]. While analysis results are most interesting when our biases are not confirmed, for a statistical test to have real significance, it should be performed on data that have been collected after an hypothesis has been stated. Since we are too impatient to wait to observe sunspots from multiple solar cycles into the distant future, to partially circumvent this conundrum, let us consider cycle-to-cycle differences for the 10 sunspot maxima seen sinceWolf first noticed the 22-yr signal;r1 = −0.66 and pr = 0.0510. By some standards, this would be deemed “significant”. But the general relevance of these results, deduced for log-max, is cast into doubt when we examine log-sums;r1 = − 0.22 and pr = 0.3782. Even though the sign of the autocorrelation, here, is negative, and consistent with that for log-max differences, the fact that this probability is not low means that anticorrelation might not be significant. So, tests on the randomness of first differences yield mixed results, and it is, at this stage, not possible to draw a firm conclusion on the significance of the 22-yr signal.
5. More Details on 22-Year Significance
 We are not the first to feel underwhelmed by the evidence for a 22-yr signal in sunspot number. Fourier time-series analyses have yielded mixed results; the signal has been both found [e.g.,Berger et al., 1990] and not found [e.g., Prestes et al., 2006]. This inconsistency might be due to a combination of a weak signal and temporal nonstationarity of solar-cycle amplitude, phase, and duration. Other approaches have been statistically based [e.g.,Wilson, 1988], but, again, clarity is still not immediately evident. For example, the Kuiper probability that odd log-maxSjand even log-maxSj could be independent realizations from the same distribution is pK = 0.3777, which is not indicative of a persistent odd-even bias. However, we need to be mindful of secular trends in the data; they can obscure statistical tests of cycle-to-cycle variation. First differencing is a simple method for removing trends and for preparing data for statistical tests [e.g.,Plosser and Schwert, 1978], which brings us back to our random-walk model of cycle-to-cycle differences.
 The Gnevyshev and Ohl rule is often cited: even cycles are supposed to have fewer sunspots than the following odd cycle, but differences between odd-to-even pairs are ignored (which we find to be arbitrary). In fact, in most publications concerned with both solar dynamo theory and a possible 22-yr biased variation, the latter is assumed to be present in both even-to-odd and odd-to-even solar-cycle pairs. In this context, the centered second-order difference
is sometimes used [e.g., Mursula et al., 2001]. This has an advantage of numerical-stability over the standard first-order differenceδj, equation (8), but it also effectively detrends the data in a way that is different from a first-order difference. For log-max, inFigure 1cwe show both difference quantities as time series, and we highlight the relative consistency with the previously reported 22-yr alternating signal – greater (fewer) sunspots for odd (even) cycles – with filled dots (inconsistency with open circles). Neither difference shows the alternating pattern for cycles 8 and 9, and they are inconsistent for cycles 18 and 22. For the most recent complete cycle, number 23, the first-order differenceδ23does not show the alternating pattern; the second-order difference2δ23cannot be calculated because cycle 24 is not yet complete. In terms of binomial “coin-flip” statistics, for log-maxδj, the probability of obtaining 14 or more successes out of 18 trials is pB = 0.0154; for 2δj the probability of 14 or more successes out of 17 trials is pB = 0.0064. Binomial tests are appealingly simple, but they do not depend on the amplitude of the differences. For this reason, Pearson lag-one autocorrelations are preferable. For log-max2δj, lag-one autocorrelation isr1 = − 0.69 and pr = 0.0030. These results, and those for log-sums, are more consistent with the existence of a 22-yr signal than results insection 4.
 To examine the effective size of the 22-yr signal, we multiply the differences by a sign-flipping “binary” factor,
[e.g., Russell and Mulligan, 1995], where the plus-minus factor is used to fix the phase; in this case, we use plus (minus) forj odd (even). From Figure 1d, we note that multiplication by the binary function results in a biased, mostly positive, distribution with mean μ = 0.2029. We calculate Student's t-test probability [Press et al., 1992, chap. 14.2] that a bias of at least this size could arise from a random sampling of a zero-mean normal distribution; for log-maxδj it is pt = 0.0257. If we had been able to objectively perform these tests on data collected after formulating the notion of a 22-yr signal, then they might be deemed “significant”. We regard these results as supporting the existence of a faint 22-yr signal in historical data, but we remain agnostic about their formal statistical significance.
6. Alternating-Normal Random-Walk Steps
 As an alternative hypothesis to the pure random-walk null hypothesis ofSection 4, we test a model that actually has 22-yr variation. We choose a simple two-parameter model, a modification of the pure random-walk model,
This model is analogous to the dynamo function (4)having magnetic-field dependence,f = f(η, α, u, Bj−1). With a logarithmic transformation applied to (12), we have
The amplitude factor βis determined by least-squares minimization of first-order differences,δj(S − βb); results are given in Table 1. Note that β ≪ σ, indicating that the 22-yr signal is faint in comparison to random variation. Log-max residuals (S − βb) are shown in Figure 1b, and corresponding residual differences in Figure 1e. Since the Kuiper probability is pK = 0.6674, we still cannot confidently reject zero-mean-normal distribution.
 As for the randomness of the residuals, these have less 22-yr signal than the pure random-walk differences; correlation with an alternating signal is shown inFigure 1ewith filled dots (lack of correlation with open circles). For first-order differences, for log-max, lag-one autocorrelation for residuals isr1 = −0.27 and pr = 0.2894, indicating that an alternating model captures a large part of the 22-yr signal in the data. The corresponding binomial probabilities for first-order differencing of residuals are not inconsistent with residual randomness. The alternating pattern in residuals for cycles 12–16 is intriguing, but it would not be meaningful to pick this subset of the data and then try to interpret its statistical significance. Viewing these results together, we conclude that the alternating random-walk model provides a slightly better fit to historical sunspot data than the pure random-walk model, and this, by itself, might be sufficient for some researchers to prefer the alternating model. Other researchers might find the pure random-walk model to be a sufficient description of sunspot data.
7. Random Trends
 The secular increase in sunspot number, seen in Figure 1b, from the Dalton minimum to the recent grand maximum, might simply be the result of multiple, normally-distributed, random-walk steps. To appreciate this, note that the accumulation ofNnormally-distributed steps is, itself, normally-distributed,
From the normal cumulative, we can estimate the probability that we would witness a trend in sunspots that equals or exceeds that which has been observed and which is accomplished in Nnormally-distributed steps,
The probabilities are listed in Table 1; they are not low. Therefore, the observed secular increase from cycle 5 to 23 is not inconsistent with a random walk, something that might be interpreted as due to a cycle-to-cycle accumulation of dynamo magnetic energy,section 3.
8. Conventional Terms
 The preceding developments can be put into more conventional mathematical terms by inverse transformation,
Changing variables conserves probability, and the random-walk model is transformed from normal(9)to log-normal,
This density function applies to the ratios of sunspot-numbers for consecutive solar cycles,equations (6) and (12). The median value of the log-normal model is 1. Therefore, with the pure random-walk model, there is a 50% probability that one cycleRj will have more sunspots than the previous cycle Rj−1, and a 50% probability that it will have less. With the alternating random-walk model, this median divide applies to the modified quantity exp(−2βbj−1)Rj−1. The statistical dispersion we can expect for Rj can be expressed in terms of the prediction interval
where for z = 1σthere is 68.3% chance that a particular step-change ratioρj will be contained in the interval IR.
9. Cycle 24 and the Next Dalton Minimum
 In Table 2we list predictions for maxima and sums for the next solar cycle, 24; for the pure random-walk model, the prediction is the same as for what was seen for cycle 23; for the 22-yr alternating random-walk model it is lower, exp(−2β)R23. We also give corresponding 1σprediction intervals. Since the 22-yr signal in sunspot data is relatively small compared cycle-to-cycle randomness,β ≪ σ, it is perhaps not surprising that the 1σprediction interval of the pure random-walk model encompasses the median of the alternating random-walk model, and vice versa. In this respect, the predictions of the two models are “statistically indistinguishable”. Specifically, the upper 1σvalue for maximum sunspot number predicted by our pure random-walk model, 178, is greater than for cycle 19, when the maximum annual-average sunspot number reached 175, the highest value ever recorded; but it is not inconsistent with the values, 155–180, predicted by the dynamo methods ofDikpati et al. . On the other hand, the lower 1σvalue for maximum sunspot number predicted by our random-walk model, 81, is less than for any cycle since 14, over 100 yrs ago; but it is very close to the value, 75, predicted bySvalgaard et al. on the basis of low-intensity solar polar magnetic field.
Table 2. Summary of (Median) Model Predictions
 Since the grand maximum seen in sunspot numbers over the past several solar cycles appears to be unusual, it is possible that the Sun might soon tend to revert to a state with fewer spots. At some time in the future, the Sun could descend back into a Dalton-like minimum [Nielsen and Kjeldsen, 2011], for which cycle maximum annual sunspot numbers are less than about 30; it is even possible that the Sun could again descend into an even deeper Maunder-like minimum [Lockwood et al., 2011] with almost no sunspots. Indeed, the finite efficiency of solar-dynamo action will eventually halt an upward trend in sunspot number, so an eventual descent would seem to be inevitable. Our phenomenological random-walk models do not have an upper limit on sunspot number, but we can use our models to estimate the probability of a secular descent into a Dalton-like minimum within (say) the next three solar cycles; the probability is about 0.02, which does not seem very high. But, again, our models predict that the most likely number of sunspots over the next few solar cycles will be about what we have had over the past few. Acceptable physics-based predictions of cycle-to-cycle change in sunspot number should, at the very least, have errors that are less than the random dispersions measured here. Future comparisons will be of interest.
 We thank C. A. Finn, J. L. Gannon, K. Mursula, D. M. Perkins, E. W. Worthington, and an anonymous person for reviewing a draft manuscript. This work was supported by the USGS Geomagnetism Program.
 The Editor thanks Michael Lockwood and an anonymous reviewer for assisting with the evaluation of this paper.