Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 866 Bytes

README.rst

File metadata and controls

38 lines (26 loc) · 866 Bytes

Dynamic Process with Mean Shift and Variance Change

Dynamic Model

Here is an example for computing detection power:

from dypro.dynamic import NormalMeanRChart

k1 = 1.2
k2 = 1.4
n = 5
chart = NormalMeanRChart(alpha=0.0027)
print(f"Detection Power = {chart.power(k1=k1, k2=k2, n=n):.4f}")

Create k2 table

from dypro.dynamic import NormalMeanVarChart, BrenthOptimizer
from dypro.create_csv import create_k2

chart = NormalMeanVarChart(alpha=0.0027)
optimizer = BrenthOptimizer(chart, power=0.5)
df = create_k2(
    optimizer=optimizer,
    k1_max=3,
    k1_num=0.1,
    n_max=30,
)
df.to_csv("xv_k2.csv", index=False, float_format="%g")