Commit 83fc90e2 authored by rhaase's avatar rhaase
Browse files

exercise solution manual/automatic comparison

parent 239a5194
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 2128\n",
"1 1640\n",
"2 2828\n",
"3 2560\n",
"4 2560\n",
"5 2644\n",
"6 2368\n",
"7 2632\n",
"8 2468\n",
"9 2672\n",
"10 2552\n",
"11 3124\n",
"12 2536\n",
"13 3016\n",
"14 3620\n",
"15 3308\n",
"16 2552\n",
"17 2732\n",
"18 2732\n",
"19 3532\n",
"20 3124\n",
"21 3532\n",
"22 1648\n",
"23 2732\n",
"24 3176\n",
"25 2732\n",
"Name: Area, dtype: int64\n",
"0 3224\n",
"1 3137\n",
"2 2653\n",
"3 2442\n",
"4 1145\n",
"5 2558\n",
"6 2768\n",
"7 1485\n",
"8 2731\n",
"9 2515\n",
"10 2756\n",
"11 2430\n",
"12 3200\n",
"13 2226\n",
"14 3335\n",
"15 132\n",
"16 2196\n",
"17 2668\n",
"18 2897\n",
"19 2952\n",
"20 2913\n",
"21 2897\n",
"22 1353\n",
"23 2061\n",
"24 3103\n",
"25 2860\n",
"26 2618\n",
"27 2639\n",
"28 2113\n",
"29 166\n",
"30 155\n",
"31 1827\n",
"32 568\n",
"Name: Area, dtype: int64\n"
]
}
],
"source": [
"import pandas as pd\n",
"\n",
"\n",
"# Load data\n",
"table_manual = pd.read_csv(\"manual/results.csv\", delimiter=',')\n",
"table_automatic = pd.read_csv(\"automatic/results.csv\", delimiter=',')\n",
"\n",
"measurement_manual = table_manual[\"Area\"]\n",
"measurement_automatic = table_automatic[\"Area\"]\n",
"\n",
"print(measurement_manual)\n",
"print(measurement_automatic)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First we determine the mean of both measurementsand compare them"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Manual: 2736.4615384615386\n",
"Automatic: 2264.3333333333335\n",
"Difference: 472.1282051282051\n"
]
}
],
"source": [
"import numpy as np\n",
"\n",
"mean_manual = np.mean(measurement_manual)\n",
"mean_automatic = np.mean(measurement_automatic)\n",
"\n",
"print(\"Manual: \" + str(mean_manual))\n",
"print(\"Automatic: \" + str(mean_automatic))\n",
"\n",
"print(\"Difference: \" + str(mean_manual - mean_automatic))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we have a look at the histograms for the measurement"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAANQUlEQVR4nO3db6xk9V3H8ffHXWrLnwaQ2wb54wXTkFDSFLypVAw2YCNlSekDH0CsQSXZJ1Zp1dQlJLY+o60aNDU1K8VSi/CA0thAqmywBI1IvQsLLN1SKF3bLSt7G6JtNZEiXx/MIVyGvf/mnDtzf/X9SiZz5twz8/vwy9wP554zZzZVhSSpPT826wCSpMlY4JLUKAtckhplgUtSoyxwSWrU9mkOdsopp9T8/Pw0h5Sk5u3du/e7VTU3vn6qBT4/P8/i4uI0h5Sk5iX5t6Ot9xCKJDXKApekRlngktQoC1ySGmWBS1KjLHBJapQFLkmNssAlqVEWuCQ1aqpXYkp6rfld98xk3IM37pjJuBqOe+CS1CgLXJIaZYFLUqMscElqlAUuSY2ywCWpURa4JDXKApekRlngktQoC1ySGmWBS1Kj1izwJLckOZJk/7J1n0jytSSPJflCkhM3N6Ykadx69sA/A1w2tm4PcF5VvQ34OnD9wLkkSWtYs8Cr6gHg+bF191bVi93DfwFO34RskqRVDHEM/DeALw3wOpKkDehV4EluAF4Ebltlm51JFpMsLi0t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/8pOfVcSeaB8xntvW2Z+RrLBTOer+5wwD7gCLCnqrbEfK2QC2b//roJ+DDw0rJ1U52vFgp8XZfsb6KLquoCRt+6+JtJLl5l21lnXW6lLNPK+Cngp4G3A4eBP55FriTHA58HPlhV31tt0xnnmvl8VdX/VtXbGV1V/Y4k562y+axzzXS+klwBHKmqvet9ymbkaqHAZ3rJflU9290fAb7A6JDIc92fPnT3R2aYdaNZDnXLm5qxqp7rfvFeAv6SVw4lTS1XkmMYleRtVXVXt3rm83W0XFthvl5WVf8B3A9cxhaYr6Pl2gLzdRHw3iQHGR3WvSTJ55j2fPU9iL/ZN0ZXiz7D6MD/yycx3zqlsY8DTli2/M+M3tSf4NUnKj7eLb+VV5+oeIYBT2J2Y8zz6pOFG87C6GsQLuSVkyaXb0KuU5ctf4jR8b+p5epe47PATWPrZzpfq+Sa9XzNASd2y28A/hG4YgvM10q5ZjpfYxnfxSsnMac6X4MVy2begMsZna3/BnDDFMc9u5v0R4EnXh4b+AngPuCp7v7kZc+5ocv5JAOc5R7LczujPxd/yOj/3NdOkgVYAPZ3P/sk3RW5A+f6a+Bx4DFG35Fz6jRzAT/P6E/Rx4B93e3yWc/XKrlmPV9vAx7pxt8P/MGk7/Up5ZrpfI1lfBevFPhU58tL6SWpUS0cA5ckHYUFLkmNssAlqVEWuCQ1ygKXpEZZ4JLUKAtckhr1f+kOhz6ea5rRAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAMoUlEQVR4nO3dXaxldX3G8e/TGajyYoRyNBSYHj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/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"def draw_histogram(data):\n",
" counts, bins = np.histogram(data, bins=10, range=(0,4000))\n",
" plt.hist(bins[:-1], bins, weights=counts)\n",
" #plt.axis([0, 10, 0, 4])\n",
" plt.show()\n",
" \n",
"draw_histogram(measurement_manual)\n",
"draw_histogram(measurement_automatic)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We should also plot them against each other in a scatter plot to get a first impression on they relate to each other"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAATtElEQVR4nO3db6hd9Z3v8fdnMuHEpvVOgqeSyUmrlMwlGpgUN0FouTSdYcz0SeyDQnKhCg1NFRssDWjVB7UPlCLTFJWruekY1KH3SKAdlEHvvY6klIDVORGnGlNvw1jraYI5c+1QTTE3pt/74KzI7vF4/uVk75Oz3i9Y7LW/a/32/m3c+Zztb/3WWqkqJEnt8Cf97oAkqXcMfUlqEUNfklrE0JekFjH0JalF/rTfHZjOJZdcUpdddlm/uyFJF5RDhw79e1UNTqwv+NC/7LLLGBkZ6Xc3JOmCkuT1yeoO70hSixj6ktQihr4ktYihL0ktYuhLUosY+pLUIoa+JLWIoS9JLbLgT87S7CWZUzvvrSAtfob+IvRh4Z3EYJdazuEdSWoRQ1+SWmTa0E+yLMnzSf41yeEk32nqdyb5TZIXm+ULXW1uS3I0yatJrumqX5XkpWbbfZnr4LMkaU5mMqZ/Cvh8Vb2TZClwMMlTzbbvV9Xfde+c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jdElac6GhoZ45513+MpXvsLrr7/OJz/5Sd59912Ghob63bVFy1/6kvrmnnvuYenSpQA0t15l6dKl3HPPPf3s1qJm6Evqm23btnHvvfeyfPlyAJYvX869997Ltm3b+tyzxStnp0n17A2TzcC9wBLg76vqu1Pt3+l0amRkpCd9k6TFIsmhqupMrPf0l36SJcB/A/4WuALYluSKXvZBktqs18M7G4GjVfVvVfX/gMeALT3ugyS1Vq9DfzXwRtfz0ab2R5LsSDKSZGRsbKxnnZOkxa7XoZ9Jah84qFBVe6uqU1WdwcHBHnRLktqh16E/Cqzpej4EHOtxHySptXo6eyfJnwL/B/gr4DfAvwD/taoOT9FmDHi9Nz1c9C4B/r3fnZA+hN/P+fXJqvrAUElPz8itqveSfB34X4xP2dw3VeA3bRzfmSdJRiabwiUtBH4/e6Pnl2GoqieBJ3v9vpIkz8iVpFYx9Ntlb787IE3B72cP9PwyDJKk/vGXviS1iKEvSS1i6LdAkn1JTiR5ud99kbolWZPkQJIjSQ4nubnffVrsHNNvgST/BXgHeLSq1ve7P9JZSVYBq6rqhSQfAw4B11bVK33u2qLlL/0WqKqfAm/1ux/SRFV1vKpeaNbfBo4wyUUYNX8MfUkLQpLLgE8Dz/W3J4uboS+p75J8FPgR8I2q+l2/+7OYGfqS+irJUsYD/4dV9eN+92exM/Ql9U2SAA8BR6pqd7/70waGfgskGQaeBf5zktEk2/vdJ6nxGeDLwOeTvNgsX+h3pxYzp2xKUov4S1+SWsTQl6QWMfQlqUUMfUlqEUNfklrE0JekFjH0JalF/j/BgjGsvWyLuAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"# plot our data\n",
"plt.boxplot([measurement_manual, measurement_automatic])\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.02195706969769767\n"
]
}
],
"source": [
"# ttest\n",
"from scipy.stats import ttest_ind\n",
"\n",
"t, p_value = ttest_ind(measurement_manual, measurement_automatic)\n",
"\n",
"print(p_value)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Conclusion, differences between manual and automatic measurements are significant:"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Difference: 472.1282051282051\n",
"p-value: 0.02195706969769767\n"
]
}
],
"source": [
"print(\"Difference: \" + str(mean_manual - mean_automatic))\n",
"print(\"p-value: \" + str(p_value))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment