On , . A valid probability density function must integrate to one, so
Thus , which is positive and ensures nonnegativity. Its expected value is
Therefore
The probability density function is symmetric around , providing a second check on the expected value.
First restrict to integers in the marginal supports: and . Their marginal probabilities are positive. By part (i), a feasible joint pair identifies a unique ordered pair of rolls, so its joint probability is ; an infeasible pair has joint probability zero.
Put and . If the two events were independent, a feasible pair would require
Since , equality forces , hence . But that pair is infeasible. An infeasible pair cannot give independence either, since its joint probability is zero while the product of its positive marginal probabilities is positive. Thus
If all real values of are allowed literally, an impossible event is independent of every event. The complete answer without a support restriction is therefore
Count the ordered roll pairs producing each value. The probability mass functions are
and are zero outside these ranges. Both counts have a unique peak:
However, forces equal rolls, whose sum is even. Hence , whereas the product of the two marginal probabilities is . This disproves independence of random variables:
Figure 1.
The 36 possible sum and difference pairs for two independent fair dice; the two marginal modes cannot occur together
. Details.
The identity gives , since the two rolls have the same probability distribution. Also . Therefore
The two random variables are uncorrelated random variables, but that alone does not establish independence of random variables.
Part (a) with gives and . By linearity of expectation,
Independence of random variables and give the same variance for the sum and difference:
This numbered item specifies the model used below. A convenient sample space is the collection of ordered pairs , each with probability . The corresponding random variables are determined by the sum and difference. Inverting the two equations gives
Thus a candidate pair is possible exactly when and are both integers between and . In particular, and must have the same parity. This inverse description will determine the joint probability mass function.
Assume the variances are finite. Expand the square and apply linearity of expectation:
Part (i), applied to the identity functions, makes the bracketed covariance zero by independence of random variables. Hence
Independence of random variables factors the joint probability mass function as . Therefore
With finite expected values, these rearrangements are justified by absolute convergence: the analogous sum with absolute values equals . Thus
Let count the red balls among the added balls. By independence of random variables, has a binomial distribution with parameters . The total red count is , and the box has balls. Conditional on , sampling without replacement gives
where denote red first and second draws. Averaging these conditional probabilities and taking their ratio gives
The binomial distribution moments give and . Consequently
Therefore the red-ball prediction with one certain red ball is
It reduces to at and approaches as the number of randomly coloured extra balls grows. Taking an unweighted average of the remaining red fractions would miss the change in weights caused by taking a conditional probability given the first red draw.
Let mean the added ball was red, and mean the first draw was red. Their relevant probabilities are , , and . The law of total probability gives .
Given the observed red draw, the remaining ball is red precisely when occurred. Bayes' theorem therefore gives
The observation increases the weight of the two-red-ball box, because that box is more likely to yield a red first draw.
The events and are disjoint and their union is . Additivity of probability gives
Both conditioning events have positive probability because . Apply the definition of conditional probability to each term to obtain the law of total probability:
For the binomial distribution, the binomial theorem gives
Differentiation of the probability generating function recovers the first expected value and second factorial moment:
Since , the variance is
Thus
The formulas also hold for and the degenerate choices , with derivatives read directly from the resulting polynomial.
For a discrete random variable taking nonnegative integer values, its probability generating function is
It is defined at least for . The usual probability generating function is intended for nonnegative integer-valued random variables; a general discrete real-valued random variable need not have this form. The coefficient of recovers .
For equal intervals, the composite trapezoidal rule is
Adding the missing term therefore gives the exact relation
Since is continuous, its Riemann sums, and hence its endpoint-averaged trapezoidal sums, converge to its definite integral. Thus and , giving
No pre-existing formula for the sum of squares is needed.
With step size , the composite trapezoidal rule gives half weight to the two endpoints:
Therefore
It exceeds the exact definite integral by , as expected because is a convex function and each trapezoid lies above the curve.
For a partial fraction decomposition, write
Multiplying by gives . Setting gives , and comparing the coefficient of gives . Thus
Integrating each term gives the antiderivative
The constant of integration can be chosen independently on each interval separated by and .
Differentiate the product using the product rule and chain rule:
Combining terms over a common denominator gives
This is equality of remainders in modular arithmetic. It is reflexive because , symmetric because implies , and transitive because and imply by addition. Thus
Its three equivalence classes are
If zero is included in , it belongs to ; otherwise that class starts at three.

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