Data table is 180K rows. Data is operational recorded data for a steady state process. Four columns measure the pressure in four separate workstreams of the process. Four columns measure the time to create the pressure in the four separate workstreams of the process.
For each workstream, its mean and standard deviation are required, for both pressure and time, to define a threshold.
For each workstream, a count must be registered when pressure is greater than 5X the workstream's standard deviation added to the workstream's mean. Similarly, a count must be registered when time is 5X the workstream's standard deviation added to the workstream's mean.
Finally, if BOTH pressure AND time exceed those workstream limits, a defect must be registered. Pressure AND time must both exceed their individual thresholds to define a defect in this process.
Is there a way to create a script or a process to automate these evaluations, so that for each 180K row data file the final defect count can be made?