diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb
index 7b5f0b3..f0e25cd 100644
--- a/.ipynb_checkpoints/Untitled-checkpoint.ipynb
+++ b/.ipynb_checkpoints/Untitled-checkpoint.ipynb
@@ -41,17 +41,53 @@
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "f56d81a7",
+ "cell_type": "markdown",
+ "id": "f1948f30",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "#### 1. State the null hypothesis\n",
+ "\n",
+ "Changing the power of the plasma beam has **NO** significant effect on the etching rate by the machine."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "baf5be91",
+ "metadata": {},
+ "source": [
+ "#### 2. State the alternate hypothesis\n",
+ "\n",
+ "At least one change of the plasma beam power **has significant effect** on the etching rate by the machine."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6c924dae",
+ "metadata": {},
+ "source": [
+ "#### 3. What is the significance level\n",
+ "\n",
+ "Significance level = 0.05"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "8c4a2b63",
+ "metadata": {},
+ "source": [
+ "#### 4. What are the degrees of freedom of model, error terms, and total DoF\n",
+ "\n",
+ "Degree of freedom of the model = 4. (each watts has 5 data set, so 5 - 1)\n",
+ "\n",
+ "error terms = i don't really know how to get this\n",
+ "\n",
+ "total DoF = 14 (total data is 15)"
+ ]
},
{
"cell_type": "code",
"execution_count": null,
- "id": "a891a030",
+ "id": "f5b616c7",
"metadata": {},
"outputs": [],
"source": []
@@ -69,18 +105,538 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 38,
"id": "f182b9b4",
"metadata": {},
"outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import statsmodels.api as sm\n",
+ "from statsmodels.formula.api import ols"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "id": "65cd134c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Power | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 160 W | \n",
+ " 5.43 | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 180 W | \n",
+ " 6.24 | \n",
+ "
\n",
+ " \n",
+ " | 2 | \n",
+ " 200 W | \n",
+ " 8.79 | \n",
+ "
\n",
+ " \n",
+ " | 3 | \n",
+ " 160 W | \n",
+ " 5.71 | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 180 W | \n",
+ " 6.71 | \n",
+ "
\n",
+ " \n",
+ " | 5 | \n",
+ " 200 W | \n",
+ " 9.20 | \n",
+ "
\n",
+ " \n",
+ " | 6 | \n",
+ " 160 W | \n",
+ " 6.22 | \n",
+ "
\n",
+ " \n",
+ " | 7 | \n",
+ " 180 W | \n",
+ " 5.98 | \n",
+ "
\n",
+ " \n",
+ " | 8 | \n",
+ " 200 W | \n",
+ " 7.90 | \n",
+ "
\n",
+ " \n",
+ " | 9 | \n",
+ " 160 W | \n",
+ " 6.01 | \n",
+ "
\n",
+ " \n",
+ " | 10 | \n",
+ " 180 W | \n",
+ " 5.66 | \n",
+ "
\n",
+ " \n",
+ " | 11 | \n",
+ " 200 W | \n",
+ " 8.15 | \n",
+ "
\n",
+ " \n",
+ " | 12 | \n",
+ " 160 W | \n",
+ " 5.59 | \n",
+ "
\n",
+ " \n",
+ " | 13 | \n",
+ " 180 W | \n",
+ " 6.60 | \n",
+ "
\n",
+ " \n",
+ " | 14 | \n",
+ " 200 W | \n",
+ " 7.55 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Power Etching Rate\n",
+ "0 160 W 5.43\n",
+ "1 180 W 6.24\n",
+ "2 200 W 8.79\n",
+ "3 160 W 5.71\n",
+ "4 180 W 6.71\n",
+ "5 200 W 9.20\n",
+ "6 160 W 6.22\n",
+ "7 180 W 5.98\n",
+ "8 200 W 7.90\n",
+ "9 160 W 6.01\n",
+ "10 180 W 5.66\n",
+ "11 200 W 8.15\n",
+ "12 160 W 5.59\n",
+ "13 180 W 6.60\n",
+ "14 200 W 7.55"
+ ]
+ },
+ "execution_count": 39,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data = pd.read_excel('files_for_lab/anova_lab_data.xlsx')\n",
+ "data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "id": "d8a62b83",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | count | \n",
+ " 15.000000 | \n",
+ "
\n",
+ " \n",
+ " | mean | \n",
+ " 6.782667 | \n",
+ "
\n",
+ " \n",
+ " | std | \n",
+ " 1.228643 | \n",
+ "
\n",
+ " \n",
+ " | min | \n",
+ " 5.430000 | \n",
+ "
\n",
+ " \n",
+ " | 25% | \n",
+ " 5.845000 | \n",
+ "
\n",
+ " \n",
+ " | 50% | \n",
+ " 6.240000 | \n",
+ "
\n",
+ " \n",
+ " | 75% | \n",
+ " 7.725000 | \n",
+ "
\n",
+ " \n",
+ " | max | \n",
+ " 9.200000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Etching Rate\n",
+ "count 15.000000\n",
+ "mean 6.782667\n",
+ "std 1.228643\n",
+ "min 5.430000\n",
+ "25% 5.845000\n",
+ "50% 6.240000\n",
+ "75% 7.725000\n",
+ "max 9.200000"
+ ]
+ },
+ "execution_count": 40,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "id": "90e09d58",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Index(['Power ', 'Etching Rate'], dtype='object')"
+ ]
+ },
+ "execution_count": 41,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.columns"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "id": "29424a6b",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "160 W 5\n",
+ "200 W 5\n",
+ "180 W 5\n",
+ "Name: Power , dtype: int64"
+ ]
+ },
+ "execution_count": 42,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data['Power '].value_counts()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "id": "aaa54da8",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " | Power | \n",
+ " | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 160 W | \n",
+ " 5.792 | \n",
+ "
\n",
+ " \n",
+ " | 180 W | \n",
+ " 6.238 | \n",
+ "
\n",
+ " \n",
+ " | 200 W | \n",
+ " 8.318 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Etching Rate\n",
+ "Power \n",
+ "160 W 5.792\n",
+ "180 W 6.238\n",
+ "200 W 8.318"
+ ]
+ },
+ "execution_count": 43,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.groupby('Power ').agg(np.mean)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "id": "2d6a459e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "new_col = []\n",
+ "for col in data.columns:\n",
+ " new_col.append(col.replace(' ','_'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "id": "5b886155",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Index(['Power_', 'Etching_Rate'], dtype='object')"
+ ]
+ },
+ "execution_count": 29,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.columns = new_col\n",
+ "data.columns"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "id": "883b070f",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " df | \n",
+ " sum_sq | \n",
+ " mean_sq | \n",
+ " F | \n",
+ " PR(>F) | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | C(Power_) | \n",
+ " 2.0 | \n",
+ " 18.176653 | \n",
+ " 9.088327 | \n",
+ " 36.878955 | \n",
+ " 0.000008 | \n",
+ "
\n",
+ " \n",
+ " | Residual | \n",
+ " 12.0 | \n",
+ " 2.957240 | \n",
+ " 0.246437 | \n",
+ " NaN | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " df sum_sq mean_sq F PR(>F)\n",
+ "C(Power_) 2.0 18.176653 9.088327 36.878955 0.000008\n",
+ "Residual 12.0 2.957240 0.246437 NaN NaN"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import statsmodels.api as sm\n",
+ "from statsmodels.formula.api import ols\n",
+ "\n",
+ "model = ols('Etching_Rate ~ C(Power_)',data=data).fit()\n",
+ "sm.stats.anova_lm(model)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b2e8ecde",
+ "metadata": {},
+ "source": [
+ "p-value(0.000008) is less than significant level (0.05), so the null hypothesis is rejected.\n",
+ "\n",
+ "There is at least one significant difference between the powers."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "782e50ff",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0f07b069",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "fb4f3f52",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "88069bc5",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "27e00963",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "03805c46",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "4338ed14",
+ "metadata": {},
+ "outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "ironhack",
+ "display_name": "Python 3",
"language": "python",
- "name": "ironhack"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
@@ -92,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.5"
+ "version": "3.8.8"
}
},
"nbformat": 4,
diff --git a/Untitled.ipynb b/Untitled.ipynb
index 7b5f0b3..f0e25cd 100644
--- a/Untitled.ipynb
+++ b/Untitled.ipynb
@@ -41,17 +41,53 @@
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "f56d81a7",
+ "cell_type": "markdown",
+ "id": "f1948f30",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "#### 1. State the null hypothesis\n",
+ "\n",
+ "Changing the power of the plasma beam has **NO** significant effect on the etching rate by the machine."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "baf5be91",
+ "metadata": {},
+ "source": [
+ "#### 2. State the alternate hypothesis\n",
+ "\n",
+ "At least one change of the plasma beam power **has significant effect** on the etching rate by the machine."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6c924dae",
+ "metadata": {},
+ "source": [
+ "#### 3. What is the significance level\n",
+ "\n",
+ "Significance level = 0.05"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "8c4a2b63",
+ "metadata": {},
+ "source": [
+ "#### 4. What are the degrees of freedom of model, error terms, and total DoF\n",
+ "\n",
+ "Degree of freedom of the model = 4. (each watts has 5 data set, so 5 - 1)\n",
+ "\n",
+ "error terms = i don't really know how to get this\n",
+ "\n",
+ "total DoF = 14 (total data is 15)"
+ ]
},
{
"cell_type": "code",
"execution_count": null,
- "id": "a891a030",
+ "id": "f5b616c7",
"metadata": {},
"outputs": [],
"source": []
@@ -69,18 +105,538 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 38,
"id": "f182b9b4",
"metadata": {},
"outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import statsmodels.api as sm\n",
+ "from statsmodels.formula.api import ols"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "id": "65cd134c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Power | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 160 W | \n",
+ " 5.43 | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 180 W | \n",
+ " 6.24 | \n",
+ "
\n",
+ " \n",
+ " | 2 | \n",
+ " 200 W | \n",
+ " 8.79 | \n",
+ "
\n",
+ " \n",
+ " | 3 | \n",
+ " 160 W | \n",
+ " 5.71 | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 180 W | \n",
+ " 6.71 | \n",
+ "
\n",
+ " \n",
+ " | 5 | \n",
+ " 200 W | \n",
+ " 9.20 | \n",
+ "
\n",
+ " \n",
+ " | 6 | \n",
+ " 160 W | \n",
+ " 6.22 | \n",
+ "
\n",
+ " \n",
+ " | 7 | \n",
+ " 180 W | \n",
+ " 5.98 | \n",
+ "
\n",
+ " \n",
+ " | 8 | \n",
+ " 200 W | \n",
+ " 7.90 | \n",
+ "
\n",
+ " \n",
+ " | 9 | \n",
+ " 160 W | \n",
+ " 6.01 | \n",
+ "
\n",
+ " \n",
+ " | 10 | \n",
+ " 180 W | \n",
+ " 5.66 | \n",
+ "
\n",
+ " \n",
+ " | 11 | \n",
+ " 200 W | \n",
+ " 8.15 | \n",
+ "
\n",
+ " \n",
+ " | 12 | \n",
+ " 160 W | \n",
+ " 5.59 | \n",
+ "
\n",
+ " \n",
+ " | 13 | \n",
+ " 180 W | \n",
+ " 6.60 | \n",
+ "
\n",
+ " \n",
+ " | 14 | \n",
+ " 200 W | \n",
+ " 7.55 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Power Etching Rate\n",
+ "0 160 W 5.43\n",
+ "1 180 W 6.24\n",
+ "2 200 W 8.79\n",
+ "3 160 W 5.71\n",
+ "4 180 W 6.71\n",
+ "5 200 W 9.20\n",
+ "6 160 W 6.22\n",
+ "7 180 W 5.98\n",
+ "8 200 W 7.90\n",
+ "9 160 W 6.01\n",
+ "10 180 W 5.66\n",
+ "11 200 W 8.15\n",
+ "12 160 W 5.59\n",
+ "13 180 W 6.60\n",
+ "14 200 W 7.55"
+ ]
+ },
+ "execution_count": 39,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data = pd.read_excel('files_for_lab/anova_lab_data.xlsx')\n",
+ "data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "id": "d8a62b83",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | count | \n",
+ " 15.000000 | \n",
+ "
\n",
+ " \n",
+ " | mean | \n",
+ " 6.782667 | \n",
+ "
\n",
+ " \n",
+ " | std | \n",
+ " 1.228643 | \n",
+ "
\n",
+ " \n",
+ " | min | \n",
+ " 5.430000 | \n",
+ "
\n",
+ " \n",
+ " | 25% | \n",
+ " 5.845000 | \n",
+ "
\n",
+ " \n",
+ " | 50% | \n",
+ " 6.240000 | \n",
+ "
\n",
+ " \n",
+ " | 75% | \n",
+ " 7.725000 | \n",
+ "
\n",
+ " \n",
+ " | max | \n",
+ " 9.200000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Etching Rate\n",
+ "count 15.000000\n",
+ "mean 6.782667\n",
+ "std 1.228643\n",
+ "min 5.430000\n",
+ "25% 5.845000\n",
+ "50% 6.240000\n",
+ "75% 7.725000\n",
+ "max 9.200000"
+ ]
+ },
+ "execution_count": 40,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "id": "90e09d58",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Index(['Power ', 'Etching Rate'], dtype='object')"
+ ]
+ },
+ "execution_count": 41,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.columns"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "id": "29424a6b",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "160 W 5\n",
+ "200 W 5\n",
+ "180 W 5\n",
+ "Name: Power , dtype: int64"
+ ]
+ },
+ "execution_count": 42,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data['Power '].value_counts()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "id": "aaa54da8",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Etching Rate | \n",
+ "
\n",
+ " \n",
+ " | Power | \n",
+ " | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 160 W | \n",
+ " 5.792 | \n",
+ "
\n",
+ " \n",
+ " | 180 W | \n",
+ " 6.238 | \n",
+ "
\n",
+ " \n",
+ " | 200 W | \n",
+ " 8.318 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Etching Rate\n",
+ "Power \n",
+ "160 W 5.792\n",
+ "180 W 6.238\n",
+ "200 W 8.318"
+ ]
+ },
+ "execution_count": 43,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.groupby('Power ').agg(np.mean)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "id": "2d6a459e",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "new_col = []\n",
+ "for col in data.columns:\n",
+ " new_col.append(col.replace(' ','_'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "id": "5b886155",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Index(['Power_', 'Etching_Rate'], dtype='object')"
+ ]
+ },
+ "execution_count": 29,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "data.columns = new_col\n",
+ "data.columns"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "id": "883b070f",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " df | \n",
+ " sum_sq | \n",
+ " mean_sq | \n",
+ " F | \n",
+ " PR(>F) | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | C(Power_) | \n",
+ " 2.0 | \n",
+ " 18.176653 | \n",
+ " 9.088327 | \n",
+ " 36.878955 | \n",
+ " 0.000008 | \n",
+ "
\n",
+ " \n",
+ " | Residual | \n",
+ " 12.0 | \n",
+ " 2.957240 | \n",
+ " 0.246437 | \n",
+ " NaN | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " df sum_sq mean_sq F PR(>F)\n",
+ "C(Power_) 2.0 18.176653 9.088327 36.878955 0.000008\n",
+ "Residual 12.0 2.957240 0.246437 NaN NaN"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import statsmodels.api as sm\n",
+ "from statsmodels.formula.api import ols\n",
+ "\n",
+ "model = ols('Etching_Rate ~ C(Power_)',data=data).fit()\n",
+ "sm.stats.anova_lm(model)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b2e8ecde",
+ "metadata": {},
+ "source": [
+ "p-value(0.000008) is less than significant level (0.05), so the null hypothesis is rejected.\n",
+ "\n",
+ "There is at least one significant difference between the powers."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "782e50ff",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0f07b069",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "fb4f3f52",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "88069bc5",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "27e00963",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "03805c46",
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "4338ed14",
+ "metadata": {},
+ "outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
- "display_name": "ironhack",
+ "display_name": "Python 3",
"language": "python",
- "name": "ironhack"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
@@ -92,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.8.5"
+ "version": "3.8.8"
}
},
"nbformat": 4,