3 examples of 'standard deviation' in Python

Every line of 'standard deviation' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
100def standard_deviation(self):
101 """Standard deviation of the distribution."""
102 clean, total = self._prepare_for_stats()
103 if not total:
104 return None
105
106 return math.sqrt(clean.variance())
232def standardDeviation(self):
233 sd = MU.SD(self.msm)
234 return sd
592def test_standard_deviation(self):
593 result = standard_deviation(
594 Array.from_list([[20, 20, 20, 18, 25, 19, 20, 20, 20, 20, 40, 30, 1, 50, 1, 1, 5, 1, 20, 20],
595 [20, 20, 20, 2, 19, 1, 20, 20, 20, 1, 15, 1, 30, 1, 1, 18, 4, 1, 20, 20]], dtype.f32)).to_numpy()
596 self.assertAlmostEqual(result[0], 12.363150892875165, delta=1e-4)
597 self.assertAlmostEqual(result[1], 9.51367436903324, delta=1e-4)

Related snippets