大家好,
1. 我們可以根據給定的平均值和 95% 置信區間產生隨機資料嗎? 就像我需要產生 100 個數據,給定平均值 (50) 和 95% 信賴區間 (45-56)。
2. 換句話說,可以產生平均值和標準差數據,但可以從 95% CI 範圍計算標準差嗎?
問候,
約格甚爾
我覺得有點奇怪,不知道需要什麼。
也許這可能是一種方法,請參閱 JSL 腳本。
作為@P_巴特爾已經指出,我們需要更多的行才能準確地看到(2 位左右)您想要的數字。 我們需要操縱分佈以顯示您想要的值(不對稱)。
拉伸確實使平均值改變了 0.2,這是我沒有考慮到的...
當然,您可以只計算 100 行並以某種方式操作它們以獲得您想要的確切數字...
或者您可以使用隨機種子,以便下次產生完全相同的隨機數。
您看,JMP 可以做到這一切...,歡迎來到社區。
祝你好運。

Names Default To Here( 1 );
// Generate data with 95 % Confidence between 45 and 56 with mean of 50
//
// returns the probability that a normally distributed random variable is less than q (45)
Normal Distribution( 45, 50, 5 );
// 0.158655, i.e. roughly 15 % of values are below 45 for a normal distribution with Average=50 and sigma=5
// Returns the quantile from a Normal distribution, the value for which the probability is p that a random value would be lower
quantile = Normal Quantile( 0.025 );
// -1.959964, i.e. 2.5 % of the values are below -1.959964, or smaller than Average minus -1.959964*sigma
// we need this quantile and have the absolute difference 2.5 % left + 2.5 % right = 5 % out, i.e. 95 % in
sigma = Abs( (50 - 45) / quantile );
Normal Distribution( 45, 50, sigma );
// 0.025, this is what we want
// now we can generate a table with that distribution
// and will scale the upper half by 6/5 to have the probability of 55 at 56 in a second column value_rightstretched
dt = New Table( "random confidence 45 50 56 95%",
add rows( 1000000 ),
New Column( "value", set each value( Random Normal( 50, sigma ) ) , Set Property("Spec Limits", {LSL(45), USL(55), Target(50), Show Limits(1)}),),
New Column( "value_rightstretched", formula( If( :value > 50, (:value - 50) * 6 / 5 + 50, :value ) ) , Set Property("Spec Limits", {LSL(45), USL(56), Target(50), Show Limits(1)}),)
);
dt << Distribution(
Continuous Distribution(
Column( :value ),
Outlier Box Plot( 0 ),
Process Capability( Use Column Property Specs ),
Customize Summary Statistics( Set Alpha Level( 0.01 ) )
),
Continuous Distribution(
Column( :value_rightstretched ),
Outlier Box Plot( 0 ),
Process Capability( Use Column Property Specs ),
Customize Summary Statistics( Set Alpha Level( 0.01 ) )
)
);
謝謝,我在谷歌搜尋時也看到了這些,但它對我不起作用。
謝謝您的解釋,我知道可能性較小,但想知道是否有人嘗試過,或者可能建議一些產生可以進一步使用的數據的路徑。
我同意@jthi的想法是反向計算標準差,從而產生具有某種所需置信水平的總體平均值。 但你只能做到一半。 我看到兩個問題......因為您將自己限制為 N = 100。 每次您針對具有指定平均值和標準差的常態分佈執行JMP 的隨機數產生器時,您將得到100 個數字...但平均值和置信區間不會完全符合您的要求...它將很接近。 ..但不準確。 重新運行隨機數產生器,您將得到不同的答案。 所以你無法準確到達那裡。 我看到的另一個問題,也許我在這裡太字面意思了......但在你原來的帖子中,你尋求的置信區間與平均值不對稱......你所說的平均值= 50,下限是45,上限為 56。 再一次......不能使用標準總體信賴區間方法來完成。