statis-ttest
t-test
t-test适用于检验一个或者两个群体的均值的方法。主要分为:评估单个群体和已知值之间是否存在差异(单样本t-test,one-sample t-test);两个群体之间是否存在差异(独立双样本检验);配对检测是否存在差异(配对样本t-test,paired samples t-test)
t-test的适用对象
一个或者两个群体的均值检验
t-test要求
数据是连续的
样本数据是从群体中随机抽取的。
方差具有同质性(即每组数据的方差相似)。
分布近似正态。
对于双样本 t 检验,我们必须有独立的样本。如果样本不独立,则可以采用配对 t 检验。
What if
如果sample size太小了怎么办?如果数据不符合normally distribution怎么办?
非参数检验:非参数检验不依赖于数据的正态分布假设,因此在样本量较小的情况下更为适用。
单样本情况:可以使用单样本Wilcoxon符号秩检验,也称为Wilcoxon signed-rank test。
双样本情况:可以使用Mann-Whitney U检验(也称为Wilcoxon秩 ...
BME | Stat - Paired Sample T-test
The one-sample t-test is a statistical hypothesis test used to determine whether an unknown population mean is different from a specific value.
Here is an example: 我们想知道601班的平均身高是否是170cm。
适用条件
Independent (values are not related to one another).
Continuous.
Obtained via a simple random sample from the population.
示例代码
MATLAB
公式:ttest
比较x的均值是否等于75
1h = ttest(x,75)
比较x的均值是否大于等于75(小于等于75)
12[h,p] = ttest(x,75,"Tail","right") % H1: mean of x is greater than 75[h,p] = ttest(x,7 ...
BME | Stat - Two Sample T-test
The two-sample t-test is a statistical hypothesis test used to determine whether an unknown population mean is different from a specific value.
Here is an example: 我们想知道601班的平均身高是否是170cm。
适用条件
Independent (values are not related to one another).
Continuous.
Obtained via a simple random sample from the population.
示例代码
MATLAB
公式:ttest2
比较x的均值是否等于75
1h = ttest(x,75)
比较x的均值是否大于等于75(小于等于75)
12[h,p] = ttest(x,75,"Tail","right") % H1: mean of x is greater than 75[h,p] = ttest(x, ...
BME | Stat - One Sample T-test
The one-sample t-test is a statistical hypothesis test used to determine whether an unknown population mean is different from a specific value.
Here is an example: 我们想知道601班的平均身高是否是170cm。
适用条件
Independent (values are not related to one another).
Continuous.
Obtained via a simple random sample from the population.
示例代码
MATLAB
函数:ttest
比较x的均值是否等于75
1h = ttest(x,75)
比较x的均值是否大于等于75(小于等于75)
12[h,p] = ttest(x,75,"Tail","right") % H1: mean of x is greater than 75[h,p] = ttest(x,7 ...
BME | Stat - Overview
T-test
Evaluating the means of one or two populations.
One sample t-test: evaluate whether a single group differs from a known value
R: t.test | MATLAB: ttest | Python: ttest_1samp
1234t.test(x, m, alternative = c("two.sided", "less", "greater"), var.equal = FALSE)# m is mean that you want to test
12[h,p] = ttest(x,m, 'Tail','right/left/both')% m is mean that you want to test
12345from scipy import statsstats.ttest_1samp(rvs, popmean ...
BME | Anatomy - Urinary System
Urinary System
Concept of Excretion
Excretion: The process of eliminating metabolic end products, excess water and inorganic salts, and foreign substances that enter the body during metabolic processes.
Basic Anatomy of the Kidneys
Outer layer cortex, inner medulla.
Cortex = Renal corpuscles (part extending into the medulla called renal columns) + Renal tubules.
Medulla = Renal pyramids.
Base of the pyramid - Renal papilla - Renal calyx - Renal pelvis - Ureter
Basic Concepts in Tissue Structure
...
BME | Anatomy - Endocrine System
Endocrine System
Basic Concepts Related to Endocrinology
Endocrine System: Hormones directly enter the extracellular fluid, then diffuse into the bloodstream, acting on respective target cells via specific circulatory pathways.
Endocrine System = Endocrine Glands + Endocrine Cells
Endocrine Cell Group: Cells within certain organs forming glandular tissues with endocrine functions.
Hormones: Highly efficient physiological substances secreted by the endocrine system.
Endocrine System: Cells or gla ...
BME | Anatomy - Nervous System
Nervous System
Basic Concepts and Terminology in Overview of the Nervous System
Nervous system/peripheral nervous system/central nervous system/spinal nerves/cranial nerves/somatic nervous system/visceral nervous system/sensory fibers/motor fibers/autonomic nervous system/sympathetic nervous system/parasympathetic nervous system
Gray Matter: A region in the brain and spinal cord where the cell bodies and dendrites of neurons are concentrated. It appears dark due to its rich vascularization in fr ...
BME | Anatomy - Digestive System
Digestive System
Concepts and Significance of Digestion and Absorption
Digestion: Breakdown of food into small molecular substances within the digestive tract.
Absorption: Passage of digested small molecular substances through the digestive tract mucosa into the bloodstream and lymphatic circulation.
Digestion Modes: Mechanical digestion (physical - digestive tract movement grinds and propels food), chemical digestion (enzymes secreted by digestive glands break down food into small molecules - c ...
BME | Machine Learning - Convex Optimization
Purpose: To learn effective methods for optimizing objectives - gradient descent. This method is based on a convex function.
Convex Optimization
The objective of this section is to solve the optimization problem below:
Where C⊂Rd\mathscr{C}\subset \mathbb{R}^dC⊂Rd, F:Rd→RF:\mathbb{R}^d \rightarrow \mathbb{R}F:Rd→R. C is a convex set, and F is a convex function.
Definitions of Convex Function and Convex Set
Definition of Convex Function:
Definition of Convex Set:
Examples of Convex Functions:
...