# Calculating Probabity - Dice Game problem

Tell us what’s happening:
The challenge says that `diceGame` should return `0.5731441`, but my function returns `0.5172414`. It seems like I’m calculating the probability correctly, but maybe there’s something I’m missing.

``````**Your code so far**
``````
``````
const mean = arr => arr.reduce((a, b) => a + b, 0) / arr.length
const scale = (val, max, newMax) => newMax / max * val

function diceGame() {
const peterMean = mean([1,2,3,4]) * 9 // the average number Peter will roll
const colinMean = mean([1,2,3,4,5,6]) * 6 // the average number Colin will roll
return scale(peterMean, peterMean + colinMean, 1).toFixed(7)
}

console.log(diceGame())
``````
``````  **Your browser information:**
``````

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15`

Challenge: Problem 205: Dice Game

I’m no math wizard, so I can’t tell you off the top of my head the algorithm for calculating the final result but I do know that it probably does not involve simple averages. From the little I do remember from my discrete mathematics course way back when, this seems like it would involve finding the probability of combinations. And for some reason the term “probability distribution” is coming to mind. Oh, how I don’t miss those things 