ASCI Logo
ASCI.Academy
LearnPracticeCompeteCareer
Sign InGet Started

Search ASCI Academy

Universal search across Courses, Lessons, Skills, Projects, Challenges, Competitions, Jobs, Internships, and Users

data science-python

Curriculum Index

Current LevelInitiate
0/ 500 XP
Gravit Certificate:
100% Required
  • 1.1 Mean, Median & Variance from Scratch
•
1
2
3
4
5
6
7
8
9
10
Module 1: Python Data Foundations & Statistics•Lesson 1

1.1 Mean, Median & Variance from Scratch

### Mathematical Definitions
$$\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i$$
$$s^2 = \frac{1}{n-1} \sum_{i=1}^n (x_i - \bar{x})^2$$
Python 3.11
•
Interactive Challenge
+60 XP
Challenge Objective

Compute the mean and print 'MEAN: 25'.

solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.