Run ❯
zig
.
com
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>Machine Learning</h1> <p>Calculate the Variance.</p> <div id="demo"></div> <script> // Calulate the Mean (m) let m = (7 + 8 + 8 + 9 + 9 + 9 + 10 + 11 + 14 + 14 + 15) / 11; // Calculate the Sum of Sqares (ss) let ss = (7 - m) ** 2 + (8 - m) ** 2 + (8 - m) ** 2 + (9 - m) ** 2 + (9 - m) ** 2 + (9 - m) ** 2 + (10 - m) ** 2 + (11 - m) ** 2 + (14 - m) ** 2 + (14 - m) ** 2 + (15 - m) ** 2; // Calculate the Variance let variance = ss / 11; // Diplay the Variance document.getElementById("demo").innerHTML = variance; </script> </body> <!-- /ai/tryit.asp?filename=tryai_variance by HTTrack Website Copier/3.x [XR&CO'2014], Thu, 06 Feb 2025 19:11:59 GMT --> </html>