Assume conditional independence of the Poisson distributions, and write , . The correct Poisson mass function has ; the positive sign in the PDF's reminder is erroneous. The group likelihood is
Multiply by the shape–rate Gamma distribution prior and integrate. The gamma integral gives
Independent baseline priors give the product over groups. For fixed , the leading factors do not depend on , proving the requested Gamma-integrated baseline Poisson likelihood.
Set , so . The multinomial logistic regression implies . Normalizing gives
Multiply the multinomial likelihoods for conditionally independent groups. The multinomial coefficients are constant in , leaving
The reference constraint identifies the coefficients: a common shift of every category coefficient otherwise leaves all probabilities unchanged. The PDF places the full sum inside the numerator exponent; the TeX breaks that expression.
The multinomial distribution has probability mass function
It is zero outside this count simplex. The multinomial coefficient counts the individual category sequences giving the same aggregate counts; the probability vector satisfies .
Yes, the pattern merits checking. Digits two and three are visibly more frequent than the Benford law predictions, whereas several large digits are scarce and nine is absent. Rough agreement for one and four does not remove this pattern.
Use the predictive discrepancy statistic comparison in part (h), together with examination of the accounts' selection and constraints. A discrepancy is evidence against this digit model, not by itself evidence sufficient to establish fabrication. No numerical test calculation is needed for this qualitative assessment.
Changing currency or monetary units multiplies amounts by a common constant without changing their generating mechanism. This motivates scale invariance of decimal significands of a generic significand distribution.
Multiplication by adds to the logarithm, rotating its fractional part. A probability distribution on the unit circle invariant under every rotation must be uniform: equal-length arcs have equal mass, and subdivision fixes that mass to arc length. Uniform fractional logarithms then give Benford law. Thus unit or currency invariance motivates uniform logarithmic mantissas. Restricted ranges, prescribed thresholds and rounding can prevent a particular collection from having this invariance.
Assuming independent digits under Benford law, put and . The count vector has a multinomial distribution, with expected counts . Suitable predictive discrepancy statistics include the Pearson chi-squared statistic and multinomial deviance:
The zero-count terms of have limiting value zero. A Monte Carlo method gives a direct null comparison even when expected counts are small.
For example, an original R implementation is:
benford_check <- function(y, B = 9999L) {
  p <- log10(1 + 1/(1:9))
  n <- sum(y)
  expected <- n*p
  observed <- sum((y - expected)^2/expected)
  replicas <- rmultinom(B, size = n, prob = p)
  simulated <- colSums((replicas - expected)^2/expected)
  (1 + sum(simulated >= observed))/(B + 1)
}
Each column returned by rmultinom is a replicated count vector. R recycles the nine expected counts down each column. The add-one ratio is a Monte Carlo test estimate. In WinBUGS, alternatively generate a replicated dmulti vector using fixed , compute its discrepancy and monitor exceedance of the observed value. The null does not estimate unknown digit probabilities. Dependence or selection in the accounts would require an appropriate simulation model.
A predictive discrepancy statistic is a specified measurable function of a possible dataset, chosen to detect a feature relevant to the null hypothesis. Under the fully specified null density , compare the observed with its reference distribution, derived analytically or from replicated datasets .
For discrepancies whose large values indicate disagreement, use
A lower-tail or two-sided discrepancy requires the corresponding comparison. The checking function is a statistic, not a density; no unknown parameter is fitted when the null is fully specified.
The claim needs a complete number of logarithmic decades. For the normalized log-uniform distribution on the specified range, is uniform on . Digit corresponds to . If is a positive integer, the integral of a period-one indicator over is times its integral over one period. Thus Benford law from logarithmic uniformity gives
This proves the intended case of integers , and even permits noninteger when the span is an integer.
For arbitrary real , the exact formula instead is
Only finitely many terms are nonzero. For a counterexample take , : then , so the leading digit is always one. That is not Benford law. The unrestricted range in the PDF needs this qualification.
The normalized log-uniform distribution here has density . A leading digit corresponds to , so
These are exactly the Benford law probabilities. Continuous densities make endpoint conventions immaterial.
For with , the change of variables gives
Equivalently,
This is the scale-invariant prior as a measure. Because its integral over diverges, it is an improper prior, not a normalized probability distribution on that range.
Assume the scale family has the differentiability needed for Fisher information, and the following constant is finite and positive. With , the score function is
Part (b) therefore gives
where is independent of . The Jeffreys prior for a scale parameter is consequently
The reciprocal-of-a-reciprocal in the TeX is a transcription error; the PDF has . The expected-Hessian information identity should not be applied indiscriminately to nonregular parameter-dependent supports.
For the scale family, substitute in the expectation:
This depends on but not on . It holds whenever the expectation exists, including an extended expectation for nonnegative ; an undefined difference of two infinite integrals is not an expectation.
For a regular scalar statistical model, the one-observation Fisher information is
Under the usual differentiation and interchange-of-integral conditions it also equals . The Jeffreys prior is
This prior measure is invariant under smooth one-to-one reparameterization, but may be improper. For independent identically distributed observations the information multiplier changes only the prior's proportionality constant.
Fit two hierarchical Bayesian models to the same observations, one with the bounded uniform distribution sampling density and the other with an exponential distribution density. Specify rate versus mean in the exponential model and assign appropriate, scientifically comparable proper prior distributions; that parameter is no longer a literal maximum size. Obtain posterior distributions, for example by Markov chain Monte Carlo, and check convergence.
At the same observational level in both models use the Bayesian deviance , excluding prior densities. Retain the same likelihood constants and consistently either condition on breed effects or integrate them out. Estimate , evaluate at the posterior mean, and compute the effective parameter count in DIC:
Smaller DIC favours the fit–complexity tradeoff. Supplement it with posterior predictive checks; the uniform model's parameter-dependent support and the hierarchical structure make the criterion a diagnostic rather than an automatic definitive decision.
Here for every breed, so and
The Bayesian model evidence increases towards its supremum as . Thus
For a Pareto distribution, . The limiting empirical prior, and each corresponding posterior distribution, collapses onto .
The boundary result is coherent within the assumed model: the observations favour the smallest allowed upper limits. Nevertheless, reporting exact concentration on a prespecified bound is overconfident for finite data and ignores hyperparameter uncertainty. A proper hyperprior on , sensitivity analysis for , or a scientifically justified restriction on concentration avoids treating this limit as certain biological knowledge.
The Type II maximum likelihood estimator maximizes the Bayesian model evidence after integrating out the breed parameters:
For positive sample sizes define . Up to an additive constant, the log-likelihood is
Differentiation gives the interior score equation
Also . If , the derivative decreases from infinity to , so a unique finite maximum exists. When all sample sizes equal , the equation becomes , giving
For no finite maximum exists. Plugging this hyperparameter estimate into the breed posterior distributions is an Empirical Bayes method.
Use the intended hierarchical Bayesian model: the breed parameters are conditionally independent given , and observations are independent given their breed parameters. Put . The uniform-Pareto model evidence factorizes over breeds:
Identical marginal prior distributions alone would not determine this product; conditional independence is the additional assumption.
Exchangeability means that the joint prior distribution is invariant under breed relabelling:
for every permutation . The labels carry no prior information about maximum size. This is reasonable for comparable breeds before observing their measurements when no covariates or biological knowledge distinguish them.
Exchangeability does not imply independence. In a hierarchical Bayesian model, the parameters can be independent conditional on a shared hyperparameter but dependent after it is integrated out. Known systematic biological differences would call for a model of those differences, with exchangeability only for the remaining unexplained variation.
The joint prior predictive distribution is the Bayesian model evidence, obtained by integrating over the shared parameter:
It is zero otherwise. This uniform-Pareto model evidence is a joint density, not the product of separately marginalized observation densities: mixing over the common parameter induces dependence.
Multiplying the likelihood function by the Pareto distribution prior gives
The integral of this kernel is , so the normalized posterior distribution is
Thus it is . This proves uniform-Pareto conjugacy: applying Bayes' theorem preserves the family of prior distributions.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact