1.0.8 • Published 3 years ago

quality_controls v1.0.8

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

Quality Controls

A Library for Calculating UCL and LCL Bounds

This is simple library for calculating quality controls bounds. Currently there are 2 types of formulas.

  1. Regular control bounds, with include both population and sample datasets.
  2. P-Chart formula

Regular Control Bounds

Here is an example of control bounds for regular population dataset

import { DataWithControls } from "quality_controls/dist/DataWithControls";

const myDefects = [/* numbers go here*/]
const myDatasetWithControls = new DataWithControls(myDefects)
// or like this:
const myDatasetWithControls = new DataWithControls(myDefects, "population")
// or like this
const myDatasetWithControls = new DataWithControls(myDefects, 0)

To change the dataset type from a population to a sample you would set it like this:

const mySampleDatasetWithControls = new DataWithControls(myDefects, "sample")
// or like this:
const mySampleDatasetWithControls = new DataWithControls(myDefects, 1)

P-Chart Control Bounds

For application of P-Chart Control Bounds you also need an array of numbers representing the population size

import { PercentDataWithControls } from "quality_controls/dist/PercentDataWithControls";

const myDefects = [/* numbers go here*/]
const myPopSizes = [/* numbers go here*/]

const myPChartData = new PercentDataWithControls(myDefects, myPopSizes)

Methods

  1. getMeanArr(): Returns an array of number which are the mean.
  2. getLowerBoundsArr(): Returns an array of numbers representing the LCL
  3. getUpperBoundsArr(): Returns an array of numbers representing the UCL
  4. getData(): returns an object with arrays of relevant data:
    • defects: An array the count of defects
    • mean: an array of number which are the mean.
    • upperBounds: an array of numbers representing the UCL
    • lowerBounds: an array of numbers representing the LCL
    • populationSizes: ONLY for P-Charts an array of numbers representing the population sizes
    • percent: ONLY for P-Charts an array of numbers representing the defects as a percent
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago