How Do You Minimize Mean Square Deviation in Dice Roll Predictions?

Click For Summary

Discussion Overview

The discussion revolves around minimizing the mean square deviation in predictions of the maximum value from two dice rolls. Participants explore the mathematical formulation of the problem, including the calculation of covariance, variance, and expected values, as well as the conditions for achieving minimal mean square deviation.

Discussion Character

  • Mathematical reasoning
  • Technical explanation
  • Exploratory

Main Points Raised

  • One participant introduces the problem of predicting the maximum of two dice rolls and proposes a mathematical framework for minimizing the mean square deviation.
  • Another participant confirms the approach and calculations regarding covariance and variance.
  • A detailed calculation of covariance is presented, leading to a value of $\frac{35}{24}$, with a subsequent calculation of variance yielding $\frac{35}{12}$.
  • Participants derive expressions for $b^{\star}$ and $a^{\star}$, concluding that $b^{\star}=\frac{1}{2}$ and $a^{\star}=\frac{49}{18}$.
  • Further calculations are provided to determine the minimal value of the mean square deviation, resulting in an expression that includes $E[Y^2]$.
  • One participant suggests that it is important to verify whether the results make sense by comparing the predictions to expected values based on the distribution of outcomes.

Areas of Agreement / Disagreement

Participants generally agree on the mathematical approach and calculations, but there is ongoing uncertainty regarding the correctness of the final results and whether the predictions align with expectations based on the distribution of outcomes.

Contextual Notes

Participants express uncertainty about the completeness and correctness of their calculations, particularly regarding the final value of the mean square deviation and its implications.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :giggle:

We consider a double roll of the dice. The random variable X describes the number of pips in the first roll of the dice and Y the maximum of the two numbers.
The joint distribution and the marginal distributions are given by the following table
1638584736834.png


Using :
For all $a,b\in \mathbb{R}$ it holds that $$E[(Y-a-bX)^2]\geq E[(Y-a^{\star}-b^{\star}X)^2]=Var(Y)(1-\rho^2(X,Y))$$ where $b^{\star}=\frac{Cov(X,Y)}{Var(X)}$ and $a^{\star}=E[Y-b^{\star}X]$.

Determine $a,b\in \mathbb{R}$ such that for X and Y the mean square deviation $E [(Y - (a + bX))^2]$ becomes minimal. Give also the corresponding minimum value for this mean square deviation.This term is minimal when $b=\frac{Cov(X,Y)}{Var(X)}$ and $a=E[Y-b^{\star}X]$, right? Sowe have to calculate these values, don't we? :unsure:
 
Last edited by a moderator:
Physics news on Phys.org
Hey mathmari!

Yep. (Nod)
 
Klaas van Aarsen said:
Yep. (Nod)

We have that $\text{Cov}(X,Y)=E[XY]-E[X]E[Y]$ with \begin{align*}E[XY]&=\sum_{x}\sum_{y}xyP[X=x,Y=y]\\ & =1\cdot 1\cdot \frac{1}{36}+1\cdot 2\cdot \frac{1}{36}+1\cdot 3\cdot \frac{1}{36}+1\cdot 4\cdot \frac{1}{36}+1\cdot 5\cdot \frac{1}{36}+1\cdot 6\cdot \frac{1}{36} \\ & +
2\cdot 2\cdot \frac{2}{36}+2\cdot 3\cdot \frac{1}{36}+2\cdot 4\cdot \frac{1}{36}+2\cdot 5\cdot \frac{1}{36}+2\cdot 6\cdot \frac{1}{36}\\ & +
3\cdot 3\cdot \frac{3}{36}+3\cdot 4\cdot \frac{1}{36}+3\cdot 5\cdot \frac{1}{36}+3\cdot 6\cdot \frac{1}{36} \\ & +
4\cdot 4\cdot \frac{4}{36}+4\cdot 5\cdot \frac{1}{36}+4\cdot 6\cdot \frac{1}{36} \\ & +
5\cdot 5\cdot \frac{5}{36}+5\cdot 6\cdot \frac{1}{36}\\ & +
6\cdot 6\cdot \frac{6}{36}
\\ & =\frac{7}{12} +\frac{11}{9} + 2+ 3 + \frac{155}{36} + 6\\ & =\frac{154}{9}
\end{align*} and \begin{align*}&E[X]=\sum_xxP[X=x]=1\cdot \frac{1}{6}+2\cdot \frac{1}{6}+3\cdot \frac{1}{6}+4\cdot \frac{1}{6}+5\cdot \frac{1}{6}+6\cdot \frac{1}{6}=\frac{7}{2}\\ &E[Y]=\sum_yyP[Y=y]=1\cdot \frac{1}{36}+2\cdot \frac{3}{36}+3\cdot \frac{5}{36}+4\cdot \frac{7}{36}+5\cdot \frac{9}{36}+6\cdot \frac{11}{36}=\frac{161}{36}\end{align*}
So we get $\text{Cov}(X,Y)=E[XY]-E[X]E[Y]=\frac{154}{9}-\frac{7}{2}\cdot \frac{161}{36}=\frac{35}{24}$.

The variance is equal to \begin{align*}Var(X)&=E[X^2]-(E[X])^2=\sum_xx^2P[X=x]-\left (\frac{7}{2}\right )^2\\ & =\left (1^2\cdot \frac{1}{6}+2^2\cdot \frac{1}{6}+3^2\cdot \frac{1}{6}+4^2\cdot \frac{1}{6}+5^2\cdot \frac{1}{6}+6^2\cdot \frac{1}{6}\right )-\frac{49}{4}=\frac{91}{6}-\frac{49}{4}\\ & =\frac{35}{12}\end{align*}

Therefore we get \begin{equation*}b^{\star}=\frac{Cov(X,Y)}{Var(X)}=\frac{\frac{35}{24}}{\frac{35}{12}}=\frac{1}{2}\end{equation*} For $a$ we have that \begin{equation*}a^{\star}=E[Y-b^{\star}X]=E\left [Y-\frac{1}{2}X\right ]=E[Y]-\frac{1}{2}\cdot E[X]=\frac{161}{36}-\frac{1}{2}\cdot \frac{7}{2}=\frac{49}{18}\end{equation*}

Is everything correct and complete? :unsure:
 
So the minimal value is
\begin{align*}E[(Y -(a^{\star}+b^{\star}X))^2]&=E\left [\left (Y -\left (\frac{49}{18}+\frac{1}{2}X\right )\right )^2\right ]\\ & =E\left [\frac{2401}{324} + \frac{49}{18} X + \frac{1}{4}X^2 - \frac{49}{9} Y - X Y + Y^2\right ]\\ & =\frac{2401}{324} + \frac{49}{18} E[X] + \frac{1}{4}E[X^2] - \frac{49}{9} E[Y ]- E[X Y] + E[Y^2]\\ & =\frac{2401}{324} + \frac{49}{18} \cdot \frac{7}{2} + \frac{1}{4}\cdot \frac{91}{6} - \frac{49}{9}\cdot \frac{161}{36}- \frac{154}{9} + E[Y^2]\\ & =-\frac{13433}{648} + E[Y^2]\end{align*}
We have that \begin{equation*}E[Y]=\sum_yy^2P[Y=y]=1^2\cdot \frac{1}{36}+2^2\cdot \frac{3}{36}+3^2\cdot \frac{5}{36}+4^2\cdot \frac{7}{36}+5^2\cdot \frac{9}{36}+6^2\cdot \frac{11}{36}=\frac{791}{36}\end{equation*}
Therefore we get \begin{equation*}E[(Y -(a^{\star}+b^{\star}X))^2]=-\frac{13433}{648} + \frac{791}{36}=\frac{805}{648}\end{equation*}
Is that correct ? :unsure:
 
Typically we should check whether what we found "makes sense".
In the case of a least squares approximation, we usually draw a graph to see if the line we found matches the points more or less. 🤔
A graph also serves to see if it even makes sense to apply a least square approximation.

In this case we can also look at the numbers.
We found the minimal relation $\hat Y=a^*+b^*X=\frac{49}{18} + \frac 12 X$.
For $X=1$ we have equal probabilities for each of the possible $Y$, so we expect a result where $\hat Y$ is in the middle between 3 and 4.
If we fill it in, we get $\hat Y(1)=\frac{49}{18}+\frac 12\cdot 1\approx 3.22$, so that is in the right neighborhood.
We should do the same thing for at least $X=6$ where we expect $\hat Y\approx 6$. 🤔
 

Similar threads

  • · Replies 42 ·
2
Replies
42
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
3K
  • · Replies 17 ·
Replies
17
Views
1K
  • · Replies 53 ·
2
Replies
53
Views
10K