樣本比例
= 母體平均數 = 中央趨勢量數
= 母體變異術 = 分散趨勢量數
= 母體比例
https://www.myclass-lin.org/wordpress/archives/615
隨機變數
給定樣本空間,如果其上的實值函數 是 (實值)可測函數,則稱為(實值)隨機變數。
A random variable is a measurable function from a set of possible outcomes to a measurable space .
代數性質
移項,拆開後得到
亦可表達為「 平方的期望值-期望值的平方」
樣本變異數,亦若是
平移不變性
平方擴充性
定義式
計算式
待自己證
https://zh.wikipedia.org/wiki/皮尔逊积矩相关系数
Correlation Coefficient
完全正相關
正相關:共變異數>0
負相關參考資料:菲利浦曲線
母體相關係數
母體標準差
樣本共變異數
樣本相關係數
我們希望能夠從 樣本推母體
即
即
樣本標準差
https://zh.wikipedia.org/wiki/切比雪夫不等式
By Markov Theorem
We have , Take
That is Chebyshev's Theorem!
eg:
台大 | 中山 | 政大 | (人數) | |
---|---|---|---|---|
男 | 30 | 66 | 234 | 330 |
女 | 18 | 42 | 210 | 270 |
48 | 108 | 444 | 600 |
列聯表
台大 | 中山 | 政大 | 機率 | |
---|---|---|---|---|
男 | 0.05 | 0.11 | 0.39 | 0.55 |
女 | 0.03 | 0.07 | 0.35 | 0.45 |
機率 | 0.08 | 0.18 | 0.74 | 1 |
邊際機率:在有兩個以上的事件的樣本空間中,若僅考慮某一事件個別發生的機率,稱為邊際機率。
也就是最右邊的 column 及 最下面的 row
獨立事件:自己看
:念作 probility of condition
算機率在離散型要注意等號
axiom:
貝氏定理:
設
Except
r.v. ~ : belongs to(服從)
P:成功的機率
二項式分配:當 n = 1 時是 bernoulli
設x為離散型r.v.,則 R:range
老師喜歡這樣表達:當你寫P(),你要在 () 中描述完整事件,所以要寫得像:P(Z<z)或f(x)…
* class P(Event);
* class f(var);
是單點機率密度
是事件機率
只有 Possion, normal 分布有封閉性
$$
iid: 獨立且同樣集合,Independent and identically distributed
Definition
在n個獨立的是/非試驗中成功的次數的離散機率分布,其中每次試驗的成功機率為p。其分佈即為二項分佈。
$$
有封閉性
Definition
A discrete random variable X is said to have a Poisson distribution with parameter λ > 0, if, for x = 0, 1, 2, …, the probability density function of X is given by:
$$
Definition
$$
有封閉性
$$
Definition
將一連續變項之觀察值發生機率以圖呈現其分布情形,且具有以下特性:
以平均數為中線,構成左右對稱之單峰、鐘型曲線分布。
觀察值之範圍為負無限大至正無限大之間。
積起來很不好積,所以查表
Computing Probabilities for Any Normal
Probability Distribution
常態分配做線性變換,依舊是常態分配
反標準化
$$
https://zh.wikipedia.org/zh-tw/指数分布
令 τ 為 隨機變數 且其 機率密度(probability density) 滿足
其中 λ>0 為常數。則我們說 τ 為 exponential distribution 或者說 τ 為 Exponential 隨機變數
By part
公式:
proof:
若某計次過程服從 poisson process 間格時間必服從指數分布
指數分布的 跟 poisson 的 互為倒數
注意單位,使用標準單位不容易錯
eg:
Poisson:
Expnential:
樣本統計量的分配,稱為抽樣分配
我們主要想要估測三件事
平均數、標準差、百分比
我們說這是統計參數
eg:
重點: 好用
用 去推論母體參數
估計值跟估計量是不同的,估計量有無限多個
有 hat 是估計量
證明
倒著寫即可。
有效性是以估計式的平均平方誤差來衡量, 越小代表估計式的有效性越高。
sum of least squares
當樣本數增大時, 估計值會漸近於母體參數真值。
A consistent estimator is one for which, when the estimate is considered as a random variable indexed by the number n of items in the data set, as n increases the estimates converge in probability to the value that the estimator is designed to estimate.
信賴區間(英語:Confidence interval,C.I)
估計 ,在 信心水準
信心水準 越大表示:越大的信心區間 [L, U] 會包含真實的母體
是中間面積
Pivotal Quantity
樞紐量有
https://en.wikipedia.org/wiki/Pivotal_quantity
wikiA pivotal quantity or pivot is a function of observations and unobservable parameters such that the function's probability distribution does not depend on the unknown parameters.
通常是點估計量的 t 或 z 分配
與 之函數組合
記為 ,且其機率分配不依賴於任何未知母數
(即,可完全被掌握)
為什麼 t 分配的自由度是 n-1?
因為t分配中的未知待估母數只有一個()
因此未必自由度是 n-1
已知樞紐量是 z
查 t 表,如果自由度很大的時候,可以近似去查 z 表
http://mail.tku.edu.tw/yinghaur/lee/stat-new/第十章補充–%E7%B5%B1%E8%A8%88%E4%BC%B0%E8%A8%88(%E6%AF%8D%E9%AB%94%E8%AE%8A%E7%95%B0%E6%95%B8%E4%B9%8B%E5%8D%80%E9%96%93%E4%BC%B0%E8%A8%88).pdf
試驗 k 次,平均有 次,未知待估母數會落在該區間。
margin error =
讓樣本據說話
檢定力(power),檢定力的大小,就是檢定的有效程度大小:
有罪推論 | 無罪推論 | |
---|---|---|
H0 | 有罪 | 無罪 |
Ha | 無罪(需負舉證責任) | 有罪 |
H0 | !H0 | |
---|---|---|
reject | type one error | 1- |
Do not reject | 1- | type two error |
如果題目沒說 沒說,一般來說設 0.05
樣本觀察值的尾機率
A p-value is a probability that provides a measure of the evidence againest the null hypothesis provided by the sample.
Smaller p-value indicate more evidence againest .
魏丞偉把檢定統計量的絕對值拿掉,假設是檢定統計量是x,|x| > a => x > a or x < -a,之後再查表找大於a,小於-a的尾巴機率,加起來就會是p-value。
結論必一致
自己算樣本變異數,所以使用 t 分配
is a standard normal distribution
is the degree of freedom
is a Chi-square distribution
單尾檢定
左尾右尾可交換,所就用左尾檢定表示,算法相同。
因此,
注意這邊 值有可能因為雙尾檢定而除以 2
想像:用 算閾值的砍點跟用 算肯定會一樣,而根據這砍點,定義我的 要多少
Recall:
同樣的
然後依樣畫葫蘆,放變數進去
我個人稱作 coSigma
在假說檢定上,需要有一個 const 放在右邊(待改進說法),所以會盡量把變數放在左邊,做假說檢定。
使用T分配
同質(Homogeneous)變異數假設:
如此帶入
檢定統計數
自由度:
檢定統計數
自由度為(取高斯整數):
(成對樣本)相依母體
Sample matched, pair!
eg: 實驗組、對照組
因為沒有 所以變異數使用 & 代替
Chi-Square symbol:
推導:
Chi-square doesn't closed!!
卡方變數之期望值=自由度
卡方變數之變異數=兩倍自由度
檢定統計數:
because
移項而已
Then we can say has {}% confidence in this intervel!
F-distribation
必要條件:
一個F-分布的隨機變數是兩個卡方分布變數除以自由度的比率:
其中,彼此獨立,自由度為
檢定統計數:
標準差較大的放上面
可以保證出來的檢定統計數,是在右尾
卡方分配(chi-square distridution)
檢定統計數:
= reality value
= expected value, ,
= number of rows
= number of columns
where
with a level of significance and degrees of freedom
and are the proportions for the populations ,
and are the sample size of populations ,
Reject or significant if:
use preverious formula to judge whether the is siginificance.
: Assumes that there is no association between the two variables.
: Assumes that there is an association between the two variables.
適合度
檢定統計數:
is the reality value
is the expected value,
is the number of categories
Use Goodness of fit test to test whether it is normal distribution.
divided by 5 in to slice.
each slice is the
And test it's
beacuse the degree of freedom is
is the number of parameters of the distribution estimated by the sample.
And the Normal distribution has 2 parameters.
Hence