Open jeanfliu opened 1 week ago
Hi @jeanfliu! Thanks for catching this — you're absolutely right; there is an issue with the calculations. We're working on resolving this in version 2 of the panel, which is currently in development. You can follow the progress and implementation of the formulas here: xmr.ts and xbars.ts.
Feel free to reach out if you have any other questions, and thanks again for your input!
Hi @mrtomeq, Thank you for the quick response! It’s great to hear there's an upcoming development version and ongoing work to update the formulas. I’ll keep an eye on the progress and look forward to seeing the improvements.
Thanks again!
Summary
Thank you for providing this valuable plugin! While reviewing the SPC calculations, I noticed that some results might differ from the standard SPC formulas. Specifically, the R-bar and S-bar calculations seem to not reflect the intended statistical process control (SPC) methodology, which could lead to inaccurate process monitoring.
Details
In
src/data/spcCalculations.tsx
, it appears that certain calculations may not align with traditional SPC practices. Please let me know if I’ve misunderstood any aspect:R-bar Calculation: (@#L118)
calcRange(values)
seems to compute the range as the global max minus min of all values. However, typically, R-bar is calculated as the average range across subgroups.calcRange(values)
with a function that computes each subgroup's range and averages it.S-bar Calculation: (@#L178)
stdDev(values)
calculates the standard deviation over the entire dataset. However, S-bar is often the average of each subgroup's standard deviation.stdDev(values)
with a function that calculates each subgroup’s standard deviation and averages it.Reference Formula
For reference, I found R-bar calculation formulas in the x̅ and R chart and S-bar calculation formulas in the x̅ and s chart.
Thanks a lot! Looking forward to your thoughts!