iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐨

[Illustrated] Essential for the AI Era: A Quick Overview of Statistics

に公開
2022/01/23

AI is trending, isn't it?

Recently, we often hear about topics like "Deep Learning," "Big Data," and "AI."

It seems like they can do many things and are very convenient.

These technologies are based on the field of statistics. In fact, statistics is used in various situations and enriches human life in ways we might not even realize.


Statistics is the foundation of deep learning


In this article, I will explain the overall picture of statistics. Now that we must navigate the upcoming AI era, it's the perfect time to learn statistics.


I have summarized the basics of Python in a book. I'd be very happy if you check it out ↓
https://zenn.dev/nekoallergy/books/python-basic
I have summarized the basics of Deep Learning in a book. I'd be very happy if you take a look ↓
https://zenn.dev/nekoallergy/books/904df952389317


I hope this helps advance your understanding, even if just by one step.



Created by NekoAllergy

What is Statistics?


Statistics: A way of thinking about large amounts of data

Statistics is a discipline that summarizes ways of thinking about large amounts of data.

I've explained this in detail with illustrations in the article below. Reading it first will help deepen your understanding.

https://zenn.dev/nekoallergy/articles/stat-basic-overview01

I believe it is a field full of possibilities.


Created by NekoAllergy

Statistics Overview

Let's take a look at the overall picture of statistics.

I hope this content serves as a framework when you study statistics. It's easier to research the meaning and usage of terms if you have the overall picture in mind. Don't try to understand everything at once; just try to grasp the general overview.

Explanations of terms are kept to a minimum. Since clarity is the priority, they may differ from strict definitions. Please understand.

Major Classifications of Statistics


Major Classifications of Statistics

Statistics can be classified into two categories.

Classification Description
1 Descriptive Statistics Methods for understanding the characteristics of complex data by converting it into an easy-to-understand format.
2 Inferential Statistics Methods for predicting the entire dataset from a sample, or predicting the future from current data.

*Classification approaches may vary by researcher.

1. Summary of Descriptive Statistics

Descriptive statistics includes roughly the following items:

  • Representative values (Mean, Median, Mode)
  • Dispersion (Quartiles, Interquartile range (Interquartile deviation), Standard deviation, Variance)
  • Frequency distribution table and histogram
  • Standardization (Z-score, T-score)
  • Correlation (Covariance, Positive/Negative/No correlation, Scatter plot, Correlation coefficient)
2. Summary of Inferential Statistics

Inferential statistics includes roughly the following items:

  • Probability (Independent trials, Conditional probability)
  • Sampling survey (Population, Sample, Census, Random sampling, Sample size, Random numbers)
  • Population mean, Population variance, Sample mean, Sample variance / Unbiased variance
  • Estimation (Point estimation, Interval estimation)
  • Testing (Z-test, F-test, t-test, Chi-square test) (Null hypothesis, Alternative hypothesis)

I will explain them one by one.




Representative Values (Central Tendency)

Representative Values


3 Representative Values

Representative values are used to summarize a large amount of data into a single numerical value. You can judge the overall characteristics of the data with one number.

There are three famous representative values. The mean is especially commonly used.

Famous Representative Value Description
1 Mean Sum of all values divided by the count
2 Median The middle value when sorted in order
3 Mode The value that appears most frequently


Choose the appropriate representative value depending on the situation

[Supplement] Actually, there are 3 types of mean

There are three ways to calculate the mean. Feel free to look them up for more details.

  1. Arithmetic Mean
  2. Geometric Mean
  3. Harmonic Mean

Additionally, there is also the Weighted Mean.

Dispersion (Variability)

Dispersion


5 Measures of Dispersion

Dispersion is an indicator that represents how spread out the data is.

Representative values like the mean alone cannot fully explain the characteristics of the entire dataset. In addition to representative values, knowing the degree of spread makes it easier to visualize the whole picture.

Famous Measures of Dispersion Description
1 Range Subtract the minimum value from the maximum value Simple and easy to understand, but sensitive to outliers
2 Interquartile Range & Interquartile Deviation Values at positions that divide the sorted data into four equal parts Not affected by outliers, but doesn't use all data points
3 Mean Deviation Sum of differences from the mean (absolute values) Uses all data, but absolute value calculations can be time-consuming
4 Variance Sum of the squares of the deviations Avoids absolute values, but harder to interpret due to being squared
5 Standard Deviation Square root of the variance Quite effective
[Supplement] What is Deviation?

Deviation is a number that shows how far a value is from the mean.
For example, the mean of the data [1, 2, 3, 4, 5] is 3.

Subtracting the mean (3) from each value results in what is called the deviation.

Data = [1, 2, 3, 4, 5]
Mean = 3
Deviation = [1-3, 2-3, 3-3, 4-3, 5-3] = [-2, -1, 0, 1, 2]

Deviation has the property that the sum of all deviations always equals zero.

Frequency Distribution Table and Histogram

Frequency Distribution Table Histogram


Frequency Distribution Table and Histogram

By using frequency distribution tables and histograms, you can put data into a more understandable format. It makes it easier to visually understand in which intervals data is concentrated. You can also see the spread.

Description
1 Frequency Distribution Table A table that summarizes data by dividing it into certain widths and counting how many data points are in each interval.
2 Histogram A graph that represents a frequency distribution table as a bar graph.
[Supplement] What is Frequency?

The number of data points within that range.

For example, you can research which age group particularly likes a product you've created.

Standardization

Standardization


Standardization

Standardization is about organizing data neatly. Organizing data makes it easier to compare. The "Deviation Score" (Hensachi) often mentioned in Japanese school tests uses this concept of standardization.

Types of Standardization Description
1 Z-score Organizes data to have a mean of 0 and a standard deviation of 1
2 T-score Organizes data to have a mean of 50 and a standard deviation of 10 (the so-called Deviation Score)

Correlation

Correlation


Correlation

Correlation is a method for finding relationships between two variables. Relationships like "taller people tend to weigh more" or "people with high science scores are likely good at math" can be clearly expressed using numerical values.

Correlation Terms Description
1 Correlation Coefficient A numerical value representing the strength of the relationship, expressed from -1.0 to +1.0.
2 Strong Correlation Correlation coefficient of ±0.7 or higher
3 Weak Correlation Correlation coefficient of ±0.4 or lower
4 No Correlation Correlation coefficient near 0
For example?

A certain supermarket reportedly investigated the correlation between items customers bought. The results showed that people who bought diapers also tended to buy beer, so they intentionally displayed them together, which supposedly increased sales.

Even for things that seem completely unrelated, statistics can be used to derive those correlations numerically.

Precautions with Correlation

Even if the correlation coefficient is high, there might be no relationship, or there might be some kind of relationship even if the correlation coefficient is 0. It is important to draw a scatter plot and check for data regularity and dispersion.



From here on, it's Inferential Statistics

Probability

Probability


Probability

Probability is a numerical value that represents how likely a certain event is to occur. You might be familiar with it through things like lotteries.

Some people might find it difficult because there are many technical terms and many things to consider. However, probability is an essential foundation for statistics, so let's make sure to understand the basics.

Probability Term Description (Ex.) Rolling a die once?
1 Event A possible occurrence Getting an even number (2,4,6)
2 Total Event The set of all possible outcomes All possible numbers (1,2,3,4,5,6)
3 Null Event An occurrence that cannot happen Rolling a 7 or higher (like 7 or 8)
4 Sample Point Individual possible outcomes One of the possible numbers (like 3)
5 Sample Space The set of all possible outcomes
(Same as Total Event)
All possible numbers (1,2,3,4,5,6)
Probability Term Description (Ex.) Rolling a die once?
1 Union of Events An event where either event A or event B occurs Odd or 3 or less
2 Intersection of Events An event where event A and event B occur simultaneously Odd and 3 or less
Probability Term Description (Example) Key Point
1 Permutation How many ways are there to choose 3 items from 5 different items and arrange them in a line? Order matters
2 Combination How many ways are there to choose 3 items from 5 different items? Order does not matter

Sampling Survey

Sampling Survey Population Sample


Sampling Survey

To investigate the characteristics of the entire Japanese population, you would normally have to survey every single Japanese person. However, since this takes an enormous amount of time and effort, it's not something we want to do.

By using statistical thinking, you can infer the characteristics of the entire Japanese population from the results of just a few people.

This concept is used in things like TV viewer ratings and cabinet approval ratings.

Sampling Survey Description
1 Population The entire set of data. All the data you want to investigate.
(e.g., total population of Japan)
2 Sample A subset randomly selected from the entire dataset.
(e.g., 10,000 Japanese people)
Sampling Survey Description
1 Population Mean The mean of the population
2 Population Variance The variance of the population
3 Sample Mean The mean of the sample
4 Sample Variance The variance of the sample
5 Unbiased Variance An estimate of the population variance calculated from the sample

Estimation

Estimation


Estimation

Estimation is a method for inferring the whole from a subset (sample). You can determine the population mean from the sample mean, or the population variance from the sample variance.

Type of Estimation Description
1 Point Estimation Inferring unknown population data from sample data
2 Interval Estimation Considering the range within which unknown population data falls based on sample data

This concept is used in TV viewer ratings.

Since it's impossible to predict unseen data with 100% accuracy, interval estimation uses a concept called confidence level.

For example, in viewer ratings?

For example, in TV viewer ratings, it's used like this: "Based on the sample survey, the viewer rating was roughly between 13% and 15%. This result can be trusted with 95% certainty (95% confidence level)."

[Supplement] When the sample size increases...?

Increasing the sample size allows for a higher confidence level. (In practice, this is expressed as narrowing the confidence interval.)

However, even if you increase the sample size 100-fold, the margin of error only decreases by 1/10, so it's not always practical.

You need to consider the balance between the effort of investigation and the results.

Statistical Testing

Testing


Testing

Statistical testing is a method of forming a hypothesis like "What if it's like this?" and determining if it is truly correct.

For example, suppose there is a fact that "it snowed in Tokyo for two consecutive weeks." You can numerically determine whether this is "something that happens normally" or "no, this rarely happens, so it must be an extraordinary occurrence."

It is very convenient because you can judge whether something is accidental or not based on objective numerical values rather than subjective judgment.

There are several types of tests. Please look them up for more details.

Type of Test Description
1 Z-test Used when the population variance is known
2 t-test Used when the population variance is unknown
3 F-test Checks if the variances of the data are equal


Summary

In this article, I provided an overview of statistics.

Statistics is the foundational thinking for deep learning, and I believe it is essential knowledge for navigating the upcoming AI era.

Once you understand statistics, you will be able to grasp machine learning concepts more smoothly.

I hope this helps advance your understanding, even if just by one step.

Please follow ♻️, like 👍, and support 🐱. It makes me very happy.

Learn More About Machine Learning

I have summarized the basics of Python in a book. I'd be very happy if you check it out ↓
https://zenn.dev/nekoallergy/books/python-basic
I have summarized the basics of Deep Learning in a book. I'd be very happy if you take a look ↓
https://zenn.dev/nekoallergy/books/904df952389317


NekoAllergy's AI

NekoAllergy's AI
I post about machine learning on YouTube. I'd be happy if you could take a look if you have time.




Created by NekoAllergy

Discussion