# yxTtherm

The Swedish company, yxTherm, produces thermostats and wish to revise their established quality assurance parameters. Currently, the production process is defined as ‘controlled’ when a maximum of 10% of the produced units are defect.

On each production day, a randomly selected sample of 25 thermostats is carried out and QA has defined that if 4 or more units in the sample show to be defect, the whole production of that day is returned to an inspection.

Inspections are costly both direct and indirectly as they tie resources, but the negative effects that defect units have as soon as they get in the hand of end user is considered to be even more costly in the long run mainly in terms of brand and company image and in the costs of repair and compensation.

So, it seems that the old production procedures and maybe even the machinery needs to be revised. At first, yxTherm wish to see if they can improve through their working procedures.

Quality assessment in current production

First, the board wishes to take the temperature of the current quality the production, defining the following question:

Question 1:

**What is the risk (in percentage) that a daily production is returned to inspection?
**

**The calculations:**

To answer Question 1, we will define the model to be used for the statistical calculation:

* The draws in the sample have two possible outcomes: defect/not defect

* The draws are not independent as they have no replacement

This would lead to a hypergeometric distribution: X follows Hypergeometric(K, N, n), where:

* K = number of defect units in one daily production

* N = the population size = the number of units produced per day

* n= the sample size = 25 draws, and in which

* p = the proportion of success/defect units in a daily production:p=K/N

However, we assume that the daily production is more than 10 times the sample size: [latex]N >10n\Leftrightarrow N>250[/latex] which means that we can approximate to the binomial distribution: [latex]X\sim Bin(n;p)[/latex] with a 10% probability of defect units, expressed by p= 0.1, so we get: the expression, the expected value and the varianse:

* [latex]{X\sim \operatorname {Bin} (25;0.1)}[/latex]

* [latex]{\operatorname {E} [X]=np}=2.5[/latex]

* [latex]{\operatorname {Var} (X)=np(1-p)} \Leftrightarrow {\operatorname {Var} (X)=250(1-0.1).} = 1.5[/latex]

The criteria for returning a one-day production to inspection is if there are 4 or more defect units in the daily sample, which can be expressed as:

[latex]\displaystyle P(X\ge 4)=1-P(X\leq 3)[/latex]

[latex]\displaystyle\Rightarrow P(X\leq k)=\sum _{i=0}^{n}{n \choose i}p^{i}(1-p)^{n-i}[/latex]

[latex]\displaystyle\Leftrightarrow P(X\leq 3)=\sum _{i=0}^{25}{25 \choose i}0.1^{i}(1-0.1)^{25-i}[/latex]

The step-by-step sum of the probablilities of having 3 or less:

[latex]\displaystyle{\Pr(0{\text{ defect units}})=f(0)=\Pr(X=0)={25 \choose 0}0.1^{0}(1-0.1)^{25-0}=0.071789799}[/latex]

[latex]\displaystyle{\Pr(1{\text{ defect unit}})=f(1)=\Pr(X=1)={25 \choose 1}0.1^{1}(1-0.1)^{25-1}=0.199416108}[/latex]

[latex]\displaystyle{\Pr(2{\text{ defect units}})=f(2)=\Pr(X=2)={25 \choose 2}0.1^{2}(1-0.1)^{25-2}=0.265888144}[/latex]

[latex]\displaystyle{\Pr(3{\text{ defect units}})=f(3)=\Pr(X=3)={25 \choose 3}0.1^{3}(1-0.1)^{25-3}=0.226497308}[/latex]

[latex]\Leftrightarrow 1 – (0.071789799+0.199416108+0.265888144+0.226497308) = \underline{0.2364}[/latex]

**The answer to Question 1: The risk that a one day production will be sent to inspection is 23.64%
**

**Conclusion**: yxTherm find that the described risk is too high and that action needs to be taken in order to improve the quality in production.

## Action to be taken

QA evaluate that this risk is too high, and consequently they have new production procedures developed and implemented with the goal of decreasing the proportion of defect units.

Question 2

Has there been a decrease in the proportion of defect units after the implementation of the new production procedures?

QA decide to take a new and larger sample of 100 units. This sample returns 6 defect units which is a 0.06 proportion of defect units compared to the initial of 0.1. Does this mean that QA can inform of an actual decrease?

**Test**

In order to answer Question 2, QA runs a hypothesis test at a significance level of 5%. As the new sample has returned a result lower than the initial, the alternative Hypothesis is: “The defect proportion is lower than 0.1” and the H0 hypothesis is the opposite and the “conservative” version: “The defect proportion is at least 0.1:

[latex]z=\frac{\hat{p} – p_0}{\sqrt{p_0 (1-p_0)}}\sqrt n[/latex]

[latex]\Leftrightarrow z=\frac{0.6 – 0.1}{\sqrt{0.1 (1-0.1)}}\sqrt 100[/latex]

##

[latex]\Leftrightarrow \underline {z=-1.33}[/latex]

As the z~5%~ = 1.645, the H~0~ hypothesis is accepted and we can therefore not conclude that the changes have led to an improvement in production.

Another way to test the sample result is to run a confidential interval for the proportion:

[latex]\displaystyle{\hat {p}}\pm z{\sqrt {\frac {{\hat {p}}\left(1-{\hat {p}}\right)}{n}}}[/latex]

[latex]\displaystyle 0.06\pm 1,96{\sqrt {\frac {{\hat {p}}\left(1-{\hat {p}}\right)}{n}}}[/latex]

[latex]\displaystyle \Leftrightarrow\ 0.6\pm 1,96{\sqrt \frac {0.06 (1 – 0.06)}{100}}[/latex]

[latex]\displaystyle \Leftrightarrow\ [0.06 \pm 0.0465]\Leftrightarrow\underline{[0.0135 ; 0.1065]}[ /latex]

This means that yxTherm can be 95% confident that the 0.1 is still within the range of values that include the true defect proportion. Thus, they cannot conclude that the defect proportion has decreased from the 0.1.

From here yxTherm could consider to take a larger sample size and calculate what the sample size should be in order to narrow it down to x interval, or they could choose directly to take action as to considering a change of machinery.