shapiro_wilk #4

Merged
s444409 merged 3 commits from shapiro_wilk into main 2022-05-17 21:39:15 +02:00
Showing only changes of commit 54581c48dd - Show all commits

View File

@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 84,
"execution_count": 86,
"metadata": {},
"outputs": [],
"source": [
@ -147,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 85,
"execution_count": 87,
"metadata": {},
"outputs": [
{
@ -162,34 +162,35 @@
}
],
"source": [
"x = dataset['Female height'].to_numpy()\n",
"shapiro_test = stats.shapiro(x)\n",
"ALPHA = 0.05\n",
"female_heights = dataset['Female height'].to_numpy()\n",
"shapiro_test = stats.shapiro(female_heights)\n",
"\n",
"if shapiro_test.pvalue > 0.05:\n",
"if shapiro_test.pvalue > ALPHA:\n",
" print(\"Female height: Dane mają rozkład normalny.\")\n",
"else:\n",
" print(\"Female height: Dane nie mają rozkładu normalnego.\")\n",
"\n",
"x = dataset['Male height'].to_numpy()\n",
"shapiro_test = stats.shapiro(x)\n",
"male_heights = dataset['Male height'].to_numpy()\n",
"shapiro_test = stats.shapiro(male_heights)\n",
"\n",
"if shapiro_test.pvalue > 0.05:\n",
"if shapiro_test.pvalue > ALPHA:\n",
" print(\"Male height: Dane mają rozkład normalny.\")\n",
"else:\n",
" print(\"Male height: Dane nie mają rozkładu normalnego.\")\n",
"\n",
"x = dataset['Weight before'].to_numpy()\n",
"shapiro_test = stats.shapiro(x)\n",
"weights_before = dataset['Weight before'].to_numpy()\n",
"shapiro_test = stats.shapiro(weights_before)\n",
"\n",
"if shapiro_test.pvalue > 0.05:\n",
"if shapiro_test.pvalue > ALPHA:\n",
" print(\"Weight before: Dane mają rozkład normalny.\")\n",
"else:\n",
" print(\"Weight before: Dane nie mają rozkładu normalnego.\")\n",
"\n",
"x = dataset['Weight after'].to_numpy()\n",
"shapiro_test = stats.shapiro(x)\n",
"weights_after = dataset['Weight after'].to_numpy()\n",
"shapiro_test = stats.shapiro(weights_after)\n",
"\n",
"if shapiro_test.pvalue > 0.05:\n",
"if shapiro_test.pvalue > ALPHA:\n",
" print(\"Weight after: Dane mają rozkład normalny.\")\n",
"else:\n",
" print(\"Weight after: Dane nie mają rozkładu normalnego.\")\n",