E3 sur les stats des poissons pour les 302
This commit is contained in:
parent
fc242187fe
commit
33f30794e0
BIN
3e/Gestion_donnees/Statistiques/E3_analyse_merou.pdf
Normal file
BIN
3e/Gestion_donnees/Statistiques/E3_analyse_merou.pdf
Normal file
Binary file not shown.
92
3e/Gestion_donnees/Statistiques/E3_analyse_merou.tex
Normal file
92
3e/Gestion_donnees/Statistiques/E3_analyse_merou.tex
Normal file
@ -0,0 +1,92 @@
|
||||
\documentclass[a4paper,10pt]{article}
|
||||
\usepackage{myXsim}
|
||||
|
||||
\usepackage{multirow}
|
||||
|
||||
\title{EPI Lagon}
|
||||
\tribe{Troisième}
|
||||
\date{Mars 2018}
|
||||
|
||||
%\geometry{left=15mm,right=15mm, bottom= 10mm, top=10mm}
|
||||
|
||||
\pagestyle{empty}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{exercise}[subtitle={Le mérou\Cal \Rep}]
|
||||
Voici les relevés (fictifs) de la taille et du poids de méroux.
|
||||
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{tabular}{|c|c|}
|
||||
\hline
|
||||
Taille (en cm) & Poids (en kg) \\
|
||||
\hline
|
||||
9.11 & 81.0 \\
|
||||
\hline
|
||||
9.66 & 78.0 \\
|
||||
\hline
|
||||
9.55 & 80.0 \\
|
||||
\hline
|
||||
7.87 & 79.0 \\
|
||||
\hline
|
||||
8.24 & 64.0 \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{tabular}{|c|c|}
|
||||
\hline
|
||||
Taille (en cm) & Poids (en kg) \\
|
||||
\hline
|
||||
5.46 & 50.0 \\
|
||||
\hline
|
||||
5.89 & 56.0 \\
|
||||
\hline
|
||||
7.9 & 78.0 \\
|
||||
\hline
|
||||
6.98 & 75.0 \\
|
||||
\hline
|
||||
5.37 & 49.0 \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{tabular}{|c|c|}
|
||||
\hline
|
||||
Taille (en cm) & Poids (en kg) \\
|
||||
\hline
|
||||
6.03 & 53.0 \\
|
||||
\hline
|
||||
7.29 & 63.0 \\
|
||||
\hline
|
||||
3.98 & 38.0 \\
|
||||
\hline
|
||||
6.08 & 40.0 \\
|
||||
\hline
|
||||
7.02 & 69.0 \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{minipage}
|
||||
|
||||
\begin{enumerate}
|
||||
\item Pour la taille, calculer la moyenne, l'étendue et la médiane de ces données.
|
||||
\item Même question pour le poids.
|
||||
\item Pensez vous que d'après ces données, le poids du poisson est proportionnel à sa taille?
|
||||
\end{enumerate}
|
||||
|
||||
\end{exercise}
|
||||
|
||||
\vfill
|
||||
\printexercise{exercise}{1}
|
||||
\vfill
|
||||
\printexercise{exercise}{1}
|
||||
\vfill
|
||||
|
||||
|
||||
\end{document}
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "master"
|
||||
%%% End:
|
||||
|
151
3e/Gestion_donnees/Statistiques/Taille et poids des merous.ipynb
Normal file
151
3e/Gestion_donnees/Statistiques/Taille et poids des merous.ipynb
Normal file
@ -0,0 +1,151 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Création de données sur la taille des poissons"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"import numpy as np"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"d = np.random.normal(60, 15, 15)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"d = d.astype(int)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"w = [round(l/9+np.random.normal(),2) for l in d]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"dt = {\"Taille\": d,\n",
|
||||
" \"Poids\": w}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"df = pd.DataFrame(dt)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 36,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"9.11 & 81.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"9.66 & 78.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"9.55 & 80.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"7.87 & 79.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"8.24 & 64.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"5.46 & 50.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"5.89 & 56.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"7.9 & 78.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"6.98 & 75.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"5.37 & 49.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"6.03 & 53.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"7.29 & 63.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"3.98 & 38.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"6.08 & 40.0 \\\\\n",
|
||||
"\\hline\n",
|
||||
"7.02 & 69.0 \\\\\n",
|
||||
"\\hline\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"for d in df.values:\n",
|
||||
" print(f\"{d[0]} & {d[1]} \\\\\\\\\")\n",
|
||||
" print(\"\\\\hline\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"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.6.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
Loading…
Reference in New Issue
Block a user