# Did I improve my process ? The statistical way with Python Let’s say that we have just modified our filling process for our 1500ml soda bottles.
We do an extract from our measurement system on the last 200 bottles produced before the modification, and 50 after.

### 1. Firsts results

Below the first results with different representations.

Scatter plot : Line plot : Box plot : ### 2. Hypothesis

Here are our hypothesis :
– In average, we’ve reduced the quantity per bottle (mean before = 1500.05ml, mean after 1499.93ml).
– We’ve reduced the dispersion (standard deviation before = 1,09, standard deviation after = 0,87).

Is it true of false ? Let’s answer by statistical checks.

### 3. Verification

#### 3.1 Normality checks

Let’s check the normality of our data.  Results :
– Visually OK.
– The Shapiro Wilk is a way above 0.05.

The data follow a normal law.

#### 3.2 Variance (dispersion) equivalence tests

We want to know if there is a difference in terms of dispersion between before and after.
For that, we’ll use a few statistical tests.
– F-test
– Levene test
– Bartlett test All the tests are above 0.05, we can say that there is no significant difference in terms of dispersion between before and after.

Note : The Bartlett test is sensitive to departures from normality, that might explain the low score.

#### 3.3 Mean equivalence test

We want to know if there is a difference in terms of mean between before and after.
For that, we’ll use a F-test assuming that the variances are equivalent (see before). As the result is a way above 0.05, we can say that there is no significant difference in terms of mean between before and after.

### 4. Conclusion Sorry, you did not improve your process !