Constants
This section covers the constants used for the creation of SPC control charts.
lost_spc.constants.get_d(m, sim_size=10000)
Correction factors for the R and X control charts.
Refer to Shewhart charts for further reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m
|
int
|
Size of each sample. |
required |
sim_size
|
int
|
Number of simulations performed to estimate d2 and d3 if no predifined value is available. |
10000
|
Returns:
| Type | Description |
|---|---|
D
|
Dataclass with the corrisponding d2 and d3 value. |
Examples:
>>> d = get_d(5)
>>> d.d2
2.326
>>> d.d3
0.864
Source code in lost_spc/constants/__init__.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
lost_spc.constants.get_c4(m)
Correction factor used for the s and corrisponding X control charts.
Refer to http://spc.pages.gitlab.ost.ch/statistische-qualitaetskontrolle/cc_variable_data.html#s-karte for further reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m
|
int
|
Size of each sample. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Calculated c4 value. |
Examples:
>>> get_c4(5)
np.float64(0.9399856029866253)
Source code in lost_spc/constants/__init__.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |