2022-2023/2nd/18_Echantillonnage/1E_piece_de.ipynb

300 lines
5.0 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "f7b010a9",
"metadata": {},
"source": [
"# Echantillonnage\n",
"\n",
"Dans ce TP, vous allez cherche à savoir si une pièce ou un dé est truqué. C'est à dire s'il donne plus souvent un résultat qu'un autre.\n",
"\n",
"Si vous le souhaitez, vous pouvez utiliser les outils de programmation pour répondre mais ce n'est pas necessaire."
]
},
{
"cell_type": "markdown",
"id": "3574ed56",
"metadata": {},
"source": [
"## Pièce trucquée?\n",
"\n",
"On importe 3 pièces sous la forme de 3 fonctions Python"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "f8574d02",
"metadata": {},
"outputs": [],
"source": [
"from echantillons import piece1, piece2, piece3"
]
},
{
"cell_type": "markdown",
"id": "a008af30",
"metadata": {},
"source": [
"Pièce 1"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "df8982e6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'pile'"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"piece1()"
]
},
{
"cell_type": "markdown",
"id": "c858e103",
"metadata": {},
"source": [
"Pièce 2"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b98436c2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'face'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"piece2()"
]
},
{
"cell_type": "markdown",
"id": "2f71532e",
"metadata": {},
"source": [
"Pièce 3"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "fa5868a0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'pile'"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"piece3()"
]
},
{
"cell_type": "markdown",
"id": "14eff698",
"metadata": {},
"source": [
"Que pensez-vous? Est-ce que ces pièces sont équilibrées?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b86ec551",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c168731c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "625a5dfd",
"metadata": {},
"source": [
"## Dé trucqué?\n",
"\n",
"On importe 3 dés sous la forme de 3 fonctions Python."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "fab62eff",
"metadata": {},
"outputs": [],
"source": [
"from echantillons import de1, de2, de3"
]
},
{
"cell_type": "markdown",
"id": "9a43f807",
"metadata": {},
"source": [
"Dé 1"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "582c9ec8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"de1()"
]
},
{
"cell_type": "markdown",
"id": "3cb2d6e7",
"metadata": {},
"source": [
"Dé 2"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "66b777f8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"de2()"
]
},
{
"cell_type": "markdown",
"id": "a241a4d4",
"metadata": {},
"source": [
"Dé 3"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "05781d0a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"de3()"
]
},
{
"cell_type": "markdown",
"id": "bd4bb96e",
"metadata": {},
"source": [
"Est-ce qu'un dé donne un nombre anormalement élevé de 6? D'un autre nombre? Lequel semble bien équilibré?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c391b26c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "81d2f6fa",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}