0Pricing
Data Science Academy · Lekcja

Średnia, mediana i moda

Trzy sposoby wyznaczania wartości centralnej

Średnia, mediana i moda to bezpłatna lekcja Data Science Academy na CoddyKit. To lekcja 1 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Data Science Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Data Science Academy zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

Finding the Center

Before you analyze anything, you ask where the data sits. A measure of center answers that with one number that stands in for the whole column. 🎯

Mean: The Average

The mean adds up every value and divides by how many there are. It is the balance point of your data, the classic average you already know.

Mean in pandas

In pandas you never loop to average. One method call on a column gives you the mean instantly.

df["age"].mean()

When the Mean Misleads

One huge value can drag the mean far from where most points sit. The mean is sensitive to outliers, so it is not always the honest center.

Median: The Middle Value

The median is the value sitting exactly in the middle once you sort the data. Half the points fall below it and half fall above.

Median Resists Outliers

Because it only cares about position, the median barely moves when a wild value appears. For skewed data like income, it often tells a fairer story.

df["income"].median()

Mode: The Most Common

The mode is simply the value that shows up most often. It is the only center that also works for text categories, not just numbers.

df["color"].mode()

More Than One Mode

Data can tie for most frequent, giving you two or more peaks. That is why mode in pandas returns a Series, never a single guaranteed number.

Mean vs Median Gap

When mean and median drift far apart, your data is skewed. A big gap is your first hint that one tail is stretching the average.

Picking the Right Center

Use the mean for tidy symmetric data, the median when outliers lurk, and the mode for categories. The shape of your data decides for you.

One Call, Many Stats

You rarely compute these alone. The describe method hands you mean and more for every numeric column in a single line.

df.describe()

Quick Check

A salary column has a few extremely high earners pulling the average up.

Recap: Three Centers

You now know three ways to find the center: mean for the average, median for the middle, and mode for the most common. Match the tool to your data's shape. 👏

Często zadawane pytania

Czy lekcja „Średnia, mediana i moda” jest bezpłatna?

Tak — pełny tekst „Średnia, mediana i moda” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Data Science Academy, przejdź na CoddyKit PRO. Kurs Data Science Academy zawiera 4 lekcji w sumie.

Co nauczysz się w „Średnia, mediana i moda”?

Trzy sposoby wyznaczania wartości centralnej Ćwiczysz Data Science Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć Data Science Academy?

Nie wymagamy żadnego doświadczenia. Data Science Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 1 z 4.

Ile czasu zajmuje lekcja „Średnia, mediana i moda”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji Data Science Academy?

Tak. Każda lekcja Data Science Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Średnia, mediana i moda
  2. Rozproszenie: wariancja i odchylenie standardowe
  3. Minimum, maksimum i kwartyle
  4. Wartości odstające i ich znaczenie
← Powrót do Data Science Academy