Statistics Basic Notes
🥥 Table of Content
🥑 Get Started!
I. Probability
- 01 - Conditional Probability & Joint Probaility
- 02 - Generative Model
- 03 - Discriminative Model
01 - Conditional Probability & Joint Probaility
In terms of probability:

II. Calculus
import sympy as sp
# Define the variables
x, y = sp.symbols('x y')
# Define the function
f = x**2 + 3*y**2
# Compute the Hessian
hessian = sp.hessian(f, [x, y]).tolist()
print(hessian)
🥥 Table of Content
🥑 Get Started!
Statistics
Types of theory
Types of interview questions
Probability
- Probability basics
- Conditional probability
- Probability distribution (Link: Probability Distributions Made Easy: Top 3 to Know for Data Science Interviews - Emma Ding | Youtube)
- Normal distribution(正态分布)
- Binomial distribution(二项分布)
- Geometric distribution(几何分布)
Hypothesis testing
-
Terminologies
- Power
- p-value
- Confidence interval
- Type I error
- Type II error
-
Parametric tests
- Z-test
- T-test
-
Non-parametric tests
- Chi-squared test
Regression
- Linear regression
- Multiple regression
Conceptual Questions
What's the distribution of avg. time spent pe user?
Explain p-value &C.I. to a non-technical audience.
What are the assumptions of linear regression?
Steps to answer
- Start with context (When or Where the terminology use)
- Provide definition of the concept
- Explain the changes(What do the changes in values mean? What does it mean when the concept has larger or smaller value?)
- Application(Why is it important for data science)
Calculation Questions
Probability basics
We have a total of 100 coins, which includes 99 fair coins and 1 biased coin that has a probability of getting heads 100%.
If you choose a random coin and flip it 10 times and all 10 times are heads, what's the probability that the coin is the biased coin?
Probability Distribution
What's the probability of getting two heads among 10 tosses of a fair coin?
Hypothesis Testing
Given two groups of users:
- Compare the click through rates
- Draw conclusions: are the two click through rates the same?
Coding Questions
Python
01 - Python kick off
02 - List I
(1) List Comprehension
Description
Build a function LstComp which takes two integers (i and j) as inputs and returns a list of numbers from i to j.
Examples
LstComp(1, 5) returns [1, 2, 3, 4, 5]
def LstComp(i, j):
# Using list comprehension to create a list of numbers from i to j
return [num for num in range(i, j + 1)]
# Testing the function with the provided example
LstComp(1, 5)
(2) OddNums
Description
Build a function OddNums which takes two integers (i and j) as inputs and returns a list of ODD numbers between i and j inclusively.
Examples
OddNums(1, 5) returns [1, 3, 5]
OddNums(2, 6) returns [3, 5]
OddNums(1, 2) returns [1]
def OddNums(i, j):
# Using list comprehension to create a list of odd numbers between i and j inclusively
return [num for num in range(i, j + 1) if num % 2 != 0]
# Testing the function with the provided examples
test_results = {
"Example 1": OddNums(1, 5),
"Example 2": OddNums(2, 6),
"Example 3": OddNums(1, 2)
}
test_results
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?