Hi... I am trying to find an alternative to Nelson Rule number 3 (6 points increasing or decreasing) that uses a regression based on a number of successive points an alpha value and a resultant p-value to help me flag when a signal is large enough to overcome noise. This is would be used for tool wear types of control charts.
Suppose I had a data set that looks like below (for simplicity) where;
X is my independent variable and Y is the dependent. I would like to calculate the P-value of the regression of successive points (N=3 in the example below) to help me understand when there is a signal large enough to overcome the noise in regression.
Obviously, the p-values are in the table below to be exemplary
I recognize that N will likely need to be larger (although, of course it depends on the size of signal) .
Can I create a script that will do this so that I can play with N and alpha to help me understand when regression is different than the null? I don't really care about the annotation on the control chart if I can have the p-value in the table.
Thanks
| X | Y | P-Value | Slope | SubGroup Size |
| 1 | 3 | | | |
| 2 | 6 | | | |
| 3 | 9 | 0.05 | | 3 |
| 4 | 12 | 0.05 | | 3 |
| 5 | 12 | 0.1 | | 3 |
| 6 | 12 | 0.54 | | 3 |
| 7 | 11 | 0.5 | | 3 |
| 8 | 13 | 0.1 | | 3 |
| 9 | 15 | 0.07 | | 3 |
| 10 | 17 | 0.05 | | 3 |