# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# $\sum_{i=1}^{n} (\frac{(x_i - m_0)^2}{n})$

# +
import numpy as np

x = np.array([1, 2, 3, 45, 0, -12])
m0 = 5

np.sum( (x - m0) ** 2 / len(x) )


StarcoderdataJupyterScriptsDedupFiltered