Control Limits

Problem #13

Tags: statistics engineering instructional

Who solved this?

Previous:Permutations with Repeating Elements Next:Trapezoidal Rule


In the realm of Industrial Manufacturing, it is often critical to keep your processes "in-control". On the surface this sounds like obvious advice, but to a Process Engineer this term has a specific meaning. A set of data produced by a process is "in-control" if no points fall outside the Control Limits.

In order to calculate the Control Limits, we must first calculate the Average Moving Range MR_avg, defined as the average difference between each consecutive data value. We then set our control limits to be X_avg ± 2.66 * MR_avg, where X_avg is the average of all data values.

Problem Statement

You will be given a set of decimal values, for which you must calculate the Upper and Lower Control Limits.

You must also identify any values in the set which are greater than the Upper Control Limit or lesser than the Lower Control Limit, as these are considered OOC "out-of-control".

Input data
The first line will contain Q, the quantity of values in the dataset.
Q lines will follow, each holding one decimal value from the dataset.
Values are listed in run order.

Answer
Should contain at least 2 space separated values: first the Lower Control Limit LCL, then the Upper Control Limit UCL, and then any OOC points.
If there are multiple OOC points, list them in ascending order.
Error should be less than 1e-6.

Example:

input data:
10
101.654059
101.678025
101.179019
102.208006
104.946042
107.771069
109.251036
106.679096
106.679014
106.304078

answer:
101.423658 108.246231 3 7
You need to login to get test data and submit solution.