我正在進行方差分析,需要查看我正在查看的多個子組的無偏方差估計。我可以使用我擁有的 d2 表手動計算它們,但我希望有一種方法可以將其放入公式中。我知道它可以從卡方分佈中推導出來,但我沒有數學知識。
任何有關提取 d2 的直接方法或手動構建它背後的數學的幫助都會有所幫助。
謝謝
埃文·莫里斯
我注意到在 JMP15 版本中,現在將計算最多 50 個樣本量的控製圖常數/無偏常數/偏差調整常數。 我很好奇 JMP 在示例數據、教學腳本或其他下是否有任何腳本。 有誰知道JMP是否可以創建這個表? 我以 Ian 的函數為基礎,製作了以下腳本來創建 SPC 課程教學表。 該表精確到小數點後 5 位,任何人都可以使用“Col”>“標準化屬性”將格式更改為 3 或 4。 SAS 軟件文檔中還提供了 d2、d3 和 c4 的函數。 也許添加腳本功能或在 JMP16 中添加表格?
// from post by ian_jmp to question on
// "Accessing Control Chart constants/unbiasing constants"
// add the complete table up to 25
Names Default To Here( 1 );
calculateD2 = Function( {n},
{Default Local},
d2 = Round( Integrate( 1 - Power( 1 - Normal Distribution( x ), n ) - Power( Normal Distribution( x ), n ), x, ., . ), 5 )
);
calculateD3 = Function( {n, d2},
{Default Local},
d3 = Round(
sqrt(
2 * (Integrate(
Integrate(
1 - Power(Normal Distribution(y),n) - Power( 1 - Normal Distribution(x),n) + Power( (Normal Distribution(y) - Normal Distribution(x)), n )
, x, ., y)
, y, ., . )) - d2^2
)
, 5 )
);
calculateC4 = Function( {n},
{Default Local},
c4 = Round( gamma(n/2) * sqrt(2/(n-1)) / gamma((n-1)/2), 5 )
);
// create table following example tables showing x-bar constants first (A2, A3)
// then d2 sigma estimate, then the R chart and S chart constants
dt = New Table("Table of Control Chart Constants",
Add Rows(24),
New Column("Sample size", Numeric, Continuous),
New Column("A2", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("A3", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("d2", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("d3", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("D3", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("D4", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("c4", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("B3", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
New Column("B4", Numeric, Continuous, Format( "Fixed Dec", 8, 5 )),
); Wait(0);
For( n = 2, n <= 25, n++,
Column(dt,"Sample size")[n-1] = n;
Column(dt,"d2")[n-1] = d2 = calculateD2( n ); Wait(0);
Column(dt,"d3")[n-1] = d3 = calculateD3( n, d2 ); Wait(0);
D3temp = 1 - 3*d3/d2;
If(D3temp > 0,
Column(dt,"D3")[n-1] = D3temp,
Column(dt,"D3")[n-1] = 0 // for negative values
);
Column(dt,"D4")[n-1] = 1 + 3*d3/d2;
Column(dt,"A2")[n-1] = 3/(d2*sqrt(n));
Column(dt,"c4")[n-1] = c4 = calculateC4( n ); Wait(0);
Column(dt,"A3")[n-1] = 3/c4/sqrt(n);
B3temp = 1 - 3 * sqrt(1/c4^2 - 1);
If(B3temp > 0,
Column(dt,"B3")[n-1] = B3temp,
Column(dt,"B3")[n-1] = 0
);
Column(dt,"B4")[n-1] = 1 + 3 * sqrt(1/c4^2 - 1);
);
好久沒看到d2的東西了!
// https://v8doc.sas.com/sashtml/qc/chapc/sect9.htm
NamesDefaultToHere(1);
calculateD2 =
Function({n}, {Default Local},
d2 = Round(Integrate(1 - Power(1 - NormalDistribution(x), n) - Power(NormalDistribution(x), n), x, ., .), 5);
);
for(n=2, n<=25, n++, Print(n, calculateD2(n)));不,我正在尋找總體標準差(sigma-hat)的無偏估計,它可以根據子組樣本標準差(s)和無偏常數(d2或c4,取決於樣本大小以及我如何計算)來計算。正在使用它們)。
假設我有 30 個相同大小的子組 (n=4)。我可以通過對子組內標準差進行平均來計算 S-bar。然後我可以將 s-bar 除以 c4 並確定總體標準差的無偏估計。
我的問題是我有不同的子組大小,所以我不能只查找一次並將其放入表中。我對於是否需要 d2 還是 c4 也有點奇怪(但這是我的問題,我會解決它)。
不管怎樣,我只是希望這些參數可以通過 JSL 中的函數輕鬆提取,它們在控製圖/SQC 工作中非常常見。
您在尋找子組的方差嗎?
https://en.wikipedia.org/wiki/Variance#Sample_variance
這將是計算標準差的平方,公式為 (Col Std Dev( col, by1, by2, ...))^2
運行下面的腳本。您還可以使用“表”>“摘要”找到此信息。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Standard Variance for Each Age and Sex Group",
Formula( (Col Std Dev( :height, :age, :sex ))^2 )
);