Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sampling Theory and Some Important Sampling Distributions

Similar presentations


Presentation on theme: "Sampling Theory and Some Important Sampling Distributions"— Presentation transcript:

1 Sampling Theory and Some Important Sampling Distributions
觀念 統計主要問題在於如何透過樣本的統計量來推估或檢證母體的參數(parameters)。 參數為描述母體某些特性的數值。 如μ、σ、母體中位數等皆為參數。 樣本統計Sample statistics 是用來描述樣本的特性的數量,樣本統計為觀察到的樣本之函數,樣本的統計量隨著取樣的不同,會有不同的變化。因此,樣本統計量本身可以被視為是一隨機變數。

2 母體參數,樣本統計量 一個樣本統計量(如樣本平均數)是隨機樣本的函數,其本身為一隨機變數 Population 母體參數
觀念 一個樣本統計量(如樣本平均數)是隨機樣本的函數,其本身為一隨機變數 Sample樣本平均數 隨機變數 x354 x103 x4 Population 母體參數 x41 x49 的特定值 x31 x1005 x4 x411 x42909 社會統計(上) ©蘇國賢2005

3 Introduction to Sampling Distribution
觀念 用於推估母體的參數(μ)的樣本統計量(如X-bar),稱為「估計式」(an estimator)。 將實際抽樣所得到的樣本帶入估計式,得到的數值(如χ-bar)稱為估計值(estimate) 社會統計(上) ©蘇國賢2005

4 抽樣分配 樣本的統計量為一隨機變數,樣本統計量的值隨著抽出樣本的不同而不同,每一個特定變量出現的機率呈某一機率分配,稱為樣本統計的抽樣分配(sampling distribution),為多次抽樣結果的機率分佈。 社會統計(上) ©蘇國賢2005

5 抽樣分配 Population 母體參數 樣本平均值的抽樣分配 x354 x103 x4 x41 x49 x31 x1005 x4 x411
觀念 樣本平均值的抽樣分配 x354 x103 Population 母體參數 x4 x41 x49 x31 x1005 x4 x411 x42909 x3423 x1321 x7 x4241 x43209

6 Very simple random sample (VSRS)
觀念 樣本中每一個元素被抽到的機率皆相同 每一個元素的期望值為母體平均數μ 每一個元素的標準差為母體標準差σ P(x1) = P( x2) … = P(xn) = population distribution P(x) Population 母體參數 E(x) = μ, Var(X) = σ2 社會統計(上) ©蘇國賢2005

7 Independently and identically distributed, i.i.d.
When X1, X2, …Xn are drawn from the same distribution and are independently distributed, they are said to be independently and identically distributed or i.i.d. 社會統計(上) ©蘇國賢2005

8 樣本平均值的期望值與變異數 如果X1, X2, …Xn 為i.i.d.,則對於每一個X而言都有相同的平均值(μ)及變異量(σ2)。
社會統計(上) ©蘇國賢2005

9 社會統計(上) ©蘇國賢2005

10 社會統計(上) ©蘇國賢2005

11 樣本平均值的期望值與變異數 社會統計(上) ©蘇國賢2005

12 中央極限定理 The Central Limit Theorem
當X為來自於母體為常態分配的i.i.d.樣本時,無論樣本數大小,樣本平均數的抽樣分配必為常態。 社會統計(上) ©蘇國賢2005

13 中央極限定理

14 中央極限定理 The Central Limit Theorem
無論母體為何種分配,若隨機樣本的樣本數夠大(n>30),則樣本平均數的抽樣分配會趨近於(approximately)常態分配 approximately If n is large 社會統計(上) ©蘇國賢2005

15 標準化分數與標準常態分配 設X為一呈常態分配的隨機變數,其平均數=,變異數為2
觀念 設X為一呈常態分配的隨機變數,其平均數=,變異數為2 Z = (X - )/,Z為標準化變數,且E(Z) = 0, Var(Z) = 1 社會統計(上) ©蘇國賢2005

16 中央極限定理 The Central Limit Theorem
如果X1, X2, …Xn 為i.i.d.,且E(X)=μ及Var(X) =σ2。 approximately N  ∞ 社會統計(上) ©蘇國賢2005

17 標準常態分配曲線下的面積 P(Z>0) = 0.5 P(Z< -z) = P(Z > z) P(Z<0) = 0.5
觀念 P(Z<0) = 0.5 P(Z>0) = 0.5 P(Z< -z) = P(Z > z) 社會統計(上) ©蘇國賢2005

18 Interval Estimation區間估計
觀念 在前章中我們介紹了各種估計母體參數的方法(point estimator)。例如我們發現樣本平均數X為母體平均數μ的一個不偏估計式。 雖然平均而言,X能正確的代表μ,但每一次觀察到的X不會剛好等於μ,而是隨著抽到的樣本不同有高有低: 社會統計(上) ©蘇國賢2005

19 Interval Estimation區間估計
觀念 因此除了點估計外,我們還想進一步知道從樣本中得到的估計值有多可靠,由於樣本的估計值本身也是一個隨機變數,不一定會剛好等於母體參數,因此我們問:估計值與母體參數有多接近? 社會統計(上) ©蘇國賢2005

20 Interval Estimation區間估計
在估計的問題中,我們希望估計式具有以下兩個性質: 1. 估計式為不偏估計(unbiased estimator),即估計式不會系統性的高估或低估母體參數。 2. 我們希望估計式的抽樣分配集中於母體參數的周圍,即估計式的變異數愈小愈好。 社會統計(上) ©蘇國賢2005

21 Interval Estimation區間估計
在估計的問題中,我們希望估計式具有以下兩個性質: θ Unbiased 社會統計(上) ©蘇國賢2005

22 Interval Estimation區間估計
觀念 從估計式的抽樣分配中,我們可以建立一套系統性的方法來表達估計式的精確度。 社會統計(上) ©蘇國賢2005

23 例題 母體:加州250,000高三學生 數學SAT分數 樣本500,得樣本平均值=461
How reliable is this estimate? 社會統計(上) ©蘇國賢2005

24 例題 根據樣本平均數的抽樣分配(sampling distribution),我們知道: 假設我們預先就知道σ=100,則 ©蘇國賢2005
社會統計(上) ©蘇國賢2005

25 根據經驗法則,.95的機率,樣本平均數會落在以μ為中心點,向左右延伸兩個標準誤的界域內。
(μ - 2 × 4.5 , μ + 2 × 4.5) 社會統計(上) ©蘇國賢2005

26 社會統計(上) ©蘇國賢2005

27 To say that x-bar lies within 9 points of μis the same as saying that μ is within 9 points of x-bar

28 Statistical confidence
The language of statistical inference uses this fact about what would happen in the long run to express our confidence in the results of any one sample. 社會統計(上) ©蘇國賢2005

29 Interval Estimation區間估計
觀念 我們通常以建構信賴區間(confidence intervals)來顯示估計式的準確度。 社會統計(上) ©蘇國賢2005

30 Interval Estimation區間估計
觀念 社會統計(上) ©蘇國賢2005

31 Confidence interval A level C confidence interval for a parameter is an interval computed from sample data by a method that has probability C of producing an interval containing the true value of the parameter. We must find the number z* such that any normal distribution has probability C within ± z* standard deviation of its mean. 社會統計(上) ©蘇國賢2005

32 社會統計(上) ©蘇國賢2005

33 Value of Zα Let Z be a standard normal random variable and let αbe any number such that 0<α<1. Then zαdenotes the number for which P(Z≧ zα) = α 社會統計(上) ©蘇國賢2005

34 Value of Zα 例題:α=.025,求zα? P(Z≧ zα) =.025 zα zα=1.96 Area=1-.025=0.975
zα=1.96 社會統計(上) ©蘇國賢2005

35 Value of Zα 例題:求z.05? P(Z≧ z.05) =.05 z.05 zα=1.645 Area=1-.05=0.95
zα=1.645 社會統計(上) ©蘇國賢2005

36 Value of Zα 例題:求z.005? P(Z≧ z.005) =.005 z.005 zα=2.58
Area=1-.005=.995 Area=.005 z.005 zα=2.58 社會統計(上) ©蘇國賢2005

37 社會統計(上) ©蘇國賢2005

38 Value of Zα P(Z≧ zα/2) =α/2 P(Z≦ -zα/2) =α/2 P(-zα/2 ≦Z≦ zα/2) =(1-α)
1-α/2-α/2 =1-α P(Z≧ zα/2) =α/2 P(Z≦ -zα/2) =α/2 P(-zα/2 ≦Z≦ zα/2) =(1-α) α/2 社會統計(上) ©蘇國賢2005

39 Confidence intervals for the mean with know population variance
假設我們從N(μ, σ2)的母體中抽取樣本數為n的樣本。其樣本平均數的抽樣分配為: 社會統計(上) ©蘇國賢2005

40 Confidence intervals for the mean with know population variance
根據先前的結果: 社會統計(上) ©蘇國賢2005

41 Confidence intervals for the mean with know population variance
這個結果告訴我們: 由這兩個數值所構成的隨機區間 會包含母體參數μ的機率為(1-α) 社會統計(上) ©蘇國賢2005

42 Level of Confidence The level of confidence (C=1-α) of a confidence interval measures the probability that a population parameter will be contained in an interval calculated after a random sample has been selected from a population. 信賴度衡量從母體中抽取隨機樣本所建構出的信賴區間會含括母體參數的機率。 α 為信賴區間沒有正確涵蓋母體參數的機率。如α=.05,則信賴度1-α=.95,表示有5%的機率信賴區間無法包含母體參數。 社會統計(上) ©蘇國賢2005

43 Level of Confidence 一般常用「母體參數會落在信賴區間的機率」來定義信賴度是一種錯誤的說法。
母體參數只有一個,不會變來變去 所建構出的區間也是一個特定的區間。 這個特定區間不是有包含母體參數,不然就是沒有包含母體參數,這不是一個機率的問題。 社會統計(上) ©蘇國賢2005

44 Confidence intervals for the mean with know population variance
Suppose we take random sample of n observations from a normal population with mean u and variance σ2. If σ2is known and the observed sample mean is x, then the confidence interval for the mean with a level of confidence 100(1-α)% is given by: Where zα/2is the number for which P(Z≧ zα/2) =α/2 社會統計(上) ©蘇國賢2005

45 例題 學校想估計去年畢業的學生第一年的年薪。假設薪資分佈為常態分配,且母體的標準差為$2000。取隨機樣本25名校友得到平均薪資為$19,500,求95%的信賴區間。 σ= $2000, n=25, x=$19500 1-α=95%, α= .05 , α/2=.025, zα/2=1.96 社會統計(上) ©蘇國賢2005

46 例題 我們之所以計算出95%的信賴區間為(18,716, 20,284)完全是因為樣本的平均數為$19,500。如果我們再抽取一個25人的樣本,則可能得到不同的區間。 如果我們一直不斷的重複取樣本1000次,則有950次(95%)所建構出的信賴區間會含括母體的平均數。 社會統計(上) ©蘇國賢2005

47 母體參數: Mean = μ Variance =σ2 μ 每個區間=

48

49 Confidence intervals for the mean with know population variance
X為會隨著樣本而變的隨機函數,因此信賴區間也會隨著樣本的不同而有差異。 100(1-α)%的機率,上述的隨機區間會含括母體參數u。 社會統計(上) ©蘇國賢2005

50 Confidence intervals for the mean with know population variance
但實際上我們通常僅抽取一個樣本,且u通常為未知,因此無法確切知道此樣本是否包含u,但我們可以說此區間有95%的機率會包含u. 社會統計(上) ©蘇國賢2005

51 Formula for commonly constructed confidence intervals
經常在使用的信賴區間 社會統計(上) ©蘇國賢2005

52 Desirable Properties of Confidence Intervals
好的信賴區間有兩個特性: 信賴度愈高愈好The interval should have a high level of confidence (1-) 信賴區間愈小愈好The interval should have narrow width(precision) 社會統計(上) ©蘇國賢2005

53 社會統計(上) ©蘇國賢2005

54 Margin of Error- The width of a confidence interval for u
(1)信賴區間的信賴度(1-α) (2)母體標準差 (3)樣本規模n 社會統計(上) ©蘇國賢2005

55 Comparing Width of Confidence Intervals
Suppose we take a random sample of size n from population having known variance 2. Construct 99%, 95%, 90% CI for the population mean and compare their widths. W1比W2的寬度多32% W2比W3的寬度多19% 社會統計(上) ©蘇國賢2005

56 Comparing Width of Confidence Intervals
To decrease the width of confidence interval, we must either use a smaller level of confidence (1-), or increase the sample size n. 99% 95% 90% 80% 50% Width of CI Confidence coefficient 社會統計(上) ©蘇國賢2005

57 例題 學校想估計去年畢業的學生第一年的年薪。假設薪資分佈為常態分配,且母體的標準差為$2000。取隨機樣本25名校友得到平均薪資為$19,500,求99%的信賴區間 ,並與95%CI做比較。 σ= $2000, n=25, x=$19500 1-α=99%, α= .01 , α/2=.005, zα/2=2.58 =1.32 社會統計(上) ©蘇國賢2005

58 Confidence intervals for large samples
建構CI需有兩個條件: (1)母體必須為常態分配。 (2)必須知道母體的變異數等於多少,即母體的變異數為已知數。 當樣本數n30,根據中央極限定律,樣本平均數的抽樣分配會趨近於常態分配,且樣本標準差會愈來愈趨近於母體標準差,所以條件(1)(2)皆能滿足。 社會統計(上) ©蘇國賢2005

59 例題 郵局的人事部門想要瞭解郵差請病假的情況,取樣100人來觀察,母體的分配及標準差皆為未知數,假設樣本平均數為8.2,s=2.7天,建構95% CI。 社會統計(上) ©蘇國賢2005

60 Student’s t distribution
先前透過Z-score來建構CI: (1)母體必須為常態分配,母體的變異數為已知數。 (2) n30 當母體標準差為未知數,且樣本數很小時,如何建構CI? 社會統計(上) ©蘇國賢2005

61 我們必須以樣本的標準差s來估計母體的標準差σ
此時我們所建構出的信賴區間會比知道母體標準差所建構出來的信賴區間更「不正確」,因此必須擴大信賴區間才能在相同的信賴水準底下涵蓋母體的參數。 社會統計(上) ©蘇國賢2005

62 Student’s t distribution
若母體 2未知,則以S來取代,我們得到t-score: 樣本數愈大,S愈接近,t分配愈接近標準常態分配Z: 社會統計(上) ©蘇國賢2005

63 t分配的一些特性 t分配為中心點為零,介於- 至的對稱分配. t分配的形狀為類似標準常態分配的鐘形分配
t distribution的平均值為 0. t分配的機率密度函數決定於參數 (nu), 即自由度(degree of freedom) 。建構平均值的信賴區間時,自由度為樣本數減一degrees of freedom is =(n-1)。 社會統計(上) ©蘇國賢2005

64 Characteristics of t distribution
t distribution 的變異數為 /(-2) for >2,其值永遠大於1。v愈大(樣本越大),變異數越接近1,其形狀越接近標準常態分配。 社會統計(上) ©蘇國賢2005

65 Characteristics of t distribution
t分配是一群機率分配的組合,不同自由度對應不同的t distribution的密度函數,由於變異數較標準常態分配大,所以形狀較為矮胖。 Standard normal (d.f.=) d.f. =4 d.f. =2 d.f. =1 社會統計(上) ©蘇國賢2005

66 Value of t, The symbol t,denotes the value of t such that the area to its right is  and t has  degree of freedom. The value t, satisfies the equation: P(t > t, )= Where the random variable t has the t distribution with  degrees of freedom. 社會統計(上) ©蘇國賢2005

67 Value of t, P(t > t0.05,13 )=0.05找出t值? 社會統計(上) ©蘇國賢2005

68 例題 Consider the t distribution having =9 degrees of freedom. Find the value t.05, 9 such that the area in the right tail of the t distribution is .05. t distribution with d.f. = 9 Area = .05 t.05=1.83 社會統計(上) ©蘇國賢2005

69 例題 Consider the t distribution having =9 degrees of freedom. Find the value t.025, 9 and -t.025, 9 such that each tail of the t distribution contains area .025. t distribution with d.f. = 9 Area = .025 -t.025= t.025= 2.262 社會統計(上) ©蘇國賢2005

70 例題 Consider the t distribution having =20 degrees of freedom. Find the value t.025, 20 such that the right tail of the distribution contains area .025. t distribution with d.f. = 20 Area = .025 t.025= 2.086 社會統計(上) ©蘇國賢2005

71 自由度 X1 X2兩個隨機變數的可能數值組合有無限多種。如果我們不作任何限制,則可以任意選定任何數值給X1及X2。 但如果我們規定:
社會統計(上) ©蘇國賢2005

72 自由度 同理,上面兩個統計量都有一樣的限制,當知道n-1個數值之後,最後一個數值已經被決定了,所有自由度僅有(n-1)。
統計學上的自由度即是指所有變數中,其數值可以自由選定之變數的個數,等於 統計量所涉及的隨機變數個數減去加諸於該統計量的限制個數。 社會統計(上) ©蘇國賢2005

73 Confidence intervals for the mean with unknown population variance
若母體 2未知,則以S來取代,我們得到t-score: has the t distribution with v = (n-1) degrees of freedom. 社會統計(上) ©蘇國賢2005

74 Constructing confidence intervals using the t distribution
The area to the right of tα/2,υis α/2 for the t distribution having v degrees of freedom. Similarly, the area to the left of -tα/2,υ is α/2 . Thus, we obtain: 社會統計(上) ©蘇國賢2005

75 Constructing confidence intervals using the t distribution
社會統計(上) ©蘇國賢2005

76 Constructing confidence intervals using the t distribution
社會統計(上) ©蘇國賢2005

77 Confidence interval for the mean of a normal population with unknown population variance
定義 Suppose we take a random sample of n observations from a normal population with mean u and unknown variance σ2. If the observed sample mean is x and the observed sample standard deviation is s, the confidence interval for the mean having level of confidence 100(1-α)% is given by 社會統計(上) ©蘇國賢2005

78 例題 例題 一工程師要估計某種鋼鐵的平均強度,假設該鋼條的強度為常態分配,他做了四個試驗,得到的強度如下 844, 847, 845, 844 ,計算該鋼條平均強度的95%信賴區間。 社會統計(上) ©蘇國賢2005

79 兩種信賴區間的比較 由t值所建構出的CI的區間比由Z-score所建構出的CI區間要寬,因為母體的變異數必須估計,誤差較大。
觀念 由t值所建構出的CI的區間比由Z-score所建構出的CI區間要寬,因為母體的變異數必須估計,誤差較大。 樣本數愈大,CI的寬度愈小。因為 n在分母 t值隨著degree of freedom的增加而減小。 社會統計(上) ©蘇國賢2005

80 兩種信賴區間的比較 CI隨著d.f.增加而減小的情形: 當d.f. 大於120時,用t值所計算的CI與用標準常態分配所計算出的CI幾乎相同。
觀念 CI隨著d.f.增加而減小的情形: 當d.f. 大於120時,用t值所計算的CI與用標準常態分配所計算出的CI幾乎相同。 社會統計(上) ©蘇國賢2005

81 例題 例題 N=121, X = $20,000 S=$4,000 construct two CI, one using t, the other using z. υ= n-1 =120, t0.025, 120 = 1.984 社會統計(上) ©蘇國賢2005

82 例題 n=10, we want to construct 95% IC using z and t.
If the variance is known, we use z =1.96 If the variance is unknown, we use t.025, 9 = 2.262 2.262/1.96=15%. The confidence interval based on the t value will be 15% wider than that based on the z value. 社會統計(上) ©蘇國賢2005

83 One-sided confidence intervals for the mean
Suppose that we wish to find the lower confidence limit (LCL) such that the probability (1-)that u exceeds LCL. The one-sided interval (LCL, ) is a left-sided confidence interval. The lower confidence limit is given by Suppose that we wish to find the upper confidence limit (UCL) such that the probability (1-)that u is less than UCL. The one-sided interval (-, UCL) is a right-sided confidence interval. The upper confidence limit is given by 社會統計(上) ©蘇國賢2005

84 One-sided confidence intervals for the mean
單邊信賴區間的意義:假設重複取樣本數為n的隨機樣本,每次計算(LCL, ),則在所有樣本所建構出的左邊信賴區間中,將有1-的機率會包含u。 社會統計(上) ©蘇國賢2005

85 One-sided confidence intervals for the mean
郵局的人事部門想要瞭解郵差請病假的情況,取樣100人來觀察,母體的分配及標準差皆為未知數,假設樣本平均數為8.2,s=2.7天,建構母體參數u的單(左)邊95%信賴區間。 95%的 機率(7.7558, ∞)會包含母體平均值u 社會統計(上) ©蘇國賢2005

86 One-sided confidence intervals for the mean
Take a random sample of n observations from some normal population having unknown mean u and unknown standard deviation σ. Suppose that we wish to find the lower confidence interval (LCL, ∞) is a left-sided confidence interval. The lower confidence limit is given by: Suppose that we wish to find the upper confidence interval (-∞, UCL) is a right-sided confidence interval 社會統計(上) ©蘇國賢2005

87 One-sided confidence intervals for the mean
例題 n=10, σ = unknown, x=14.5, s = 2.5. Construct 95% left-sided CI for the population mean u. The 95% left-sided confidence interval for u is (13.051, ∞) 社會統計(上) ©蘇國賢2005

88 Determining the sample size決定樣本大小
Confidence interval for the mean: Suppose an individual is interested in estimating the mean of a population having a known variance 2. How large a sample size must be taken if the investigator wants the probability to be (1-) that the sampling error |X - u| is less than some amount D? 社會統計(上) ©蘇國賢2005

89 Determining the sample size決定樣本大小
信賴區間是以X 為中心,向左右各伸展: 將D固定,求n=? 社會統計(上) ©蘇國賢2005

90 例題 An economist wants to estimate the mean annual income of households in a particular congressional district. It is assumed that the population standard deviation is =$4,000. The economist wants the probability to be .95 that the sample mean will be within a D = $500 of the true mean u. How large a sample is required? 社會統計(上) ©蘇國賢2005

91 複習 母體分配 根據中央極限定律,我們知道樣本夠大時,樣本平均數的抽樣分配為常態分配

92 母體參數: Mean = μ Variance =σ2 μ 每個區間=

93 複習 設(x1,x2…xn)為由某母體抽出的隨機樣本,為此母體之參數,假設T1, T2為兩個統計量,使得
社會統計(上) ©蘇國賢2005

94 複習 D T1 T2 社會統計(上) ©蘇國賢2005

95 複習 母體平均數u之區間估計: 當母體標準差σ已知,且n>30,則 為母體平均數u的100(1-)%的信賴區間 ©蘇國賢2005
社會統計(上) ©蘇國賢2005

96 Confidence intervals for the mean with unknown population variance
若母體 2未知,則以S來取代,我們得到t-score: has the t distribution with v = (n-1) degrees of freedom. 社會統計(上) ©蘇國賢2005

97 複習 母體平均數u之區間估計: 當母體標準差σ未知則 為母體平均數u的100(1-)%的信賴區間 社會統計(上) ©蘇國賢2005

98 複習 當樣本數未定,但n>30,若誤差界線D已知,則樣本數為 母體平均數u之點估計:
一般以X 來估計u ,也就是取X做為u的估計式,因此X為u之點估計值。 當樣本數n已知,且n>30,以X估計u的100(1-)%誤差界線為 當樣本數未定,但n>30,若誤差界線D已知,則樣本數為 社會統計(上) ©蘇國賢2005

99 複習 一個日光燈製造公司生產的燈管壽命近似常態分配,它的標準差為100小時。某品管人員隨機抽樣32燈管,經使用後觀察其壽命,得平均壽命為1200小時 (1)求該公司生產的每支燈管的平均壽命之估計值。 平均壽命u之點估計值為x=1200小時 社會統計(上) ©蘇國賢2005

100 複習 故應再取97-32=65支 (2)求(1)中的估計之95%誤差界線?
(3)若希望(2)中的95%誤差界線為20小時,問此題的樣本夠不夠大?若不夠大應再抽多少樣本? 故應再取97-32=65支 社會統計(上) ©蘇國賢2005

101 複習 (4)求該公司生產的每支燈管平均壽命的90%及95%信賴區間 社會統計(上) ©蘇國賢2005


Download ppt "Sampling Theory and Some Important Sampling Distributions"

Similar presentations


Ads by Google