Voici un aperçu rapide de la syntaxe Markdown repris d'une
[[https://guides.github.com/features/mastering-markdown/][présentation de GitHub]] ainsi que de celles d'[[http://csrgxtu.github.io/2015/03/20/Writing-Mathematic-Fomulars-in-Markdown/][Archer Reilly]].
* Table des matières :TOC:
- [[#syntaxe][Syntaxe]]
- [[#headers][Headers]]
- [[#emphasis][Emphasis]]
- [[#lists][Lists]]
- [[#images][Images]]
- [[#links][Links]]
- [[#blockquotes][Blockquotes]]
- [[#inline-code][Inline code]]
- [[#écrire-des-maths][Écrire des Maths]]
- [[#lettres-grecques][Lettres grecques]]
- [[#fonctions-et-opérateurs][Fonctions et opérateurs]]
Tout d'abord, pour aller plus loin avec =Markdown= et ses extensions / ramifications :
- Le didacticiel « [[https://enacit1.epfl.ch/markdown-pandoc/][Élaboration et conversion de documents avec Markdown et Pandoc]] » de Jean-Daniel Bonjour (EPFL), précis, complet, concis, en français ; un vrai bonheur !
- L'article [[https://en.wikipedia.org/wiki/Markdown#Example][Markdown]] de wikipedia en anglais contient un bon pense-bête sur la syntaxe =Markdown=.
- GitHub propose un court et efficace didacticiel (en anglais) : [[https://guides.github.com/features/mastering-markdown/][Mastering Markdown]].
Comme nous l'illustrons dans le « film d'écran » (/screencast/), l'éditeur de texte des dépôts =GitHub=
et =GitLab= permet d'interpréter / transformer à la demande un fichier =Markdown= en un fichier
=html=. C'est à la fois agréable et pratique, mais ce n'est pas une solution pour une utilisation
quotidienne de =Markdown=, pour cela, il est plus efficace d'éditer son texte, avec un éditeur de
texte, sur son ordinateur, avant de « l'exporter » dans un format comme =html=, =pdf=, =docx=, =epub=,
etc. Il existe des éditeurs plus ou moins spécialisés pour =Markdown=, certains sont indiqués sur la
page [[https://github.com/jgm/pandoc/wiki/Pandoc-Extras#editors][Editors]] du site de =Pandoc=, mais nous préconisons clairement l'emploi d'un éditeur de texte
« généraliste » capable de reconnaître la syntaxe =Markdown=. Nous en avons indiqué en début de
séquence et on pourra trouver des informations complémentaires dans la section
[[https://enacit1.epfl.ch/markdown-pandoc/#editeurs_markdown][Quelques éditeurs adaptés à l'édition Markdown]] du didacticiel de Jean-Daniel Bonjour.
Pour convertir un fichier =Markdown= en un format « arbitraire », la solution à ce jour la plus
complète est [[http://pandoc.org/][Pandoc]], logiciel développé par John MacFarlane, un philosophe de Berkeley (le site
[[https://github.com/jgm/pandoc][GitHub]]). En plus du site de =Pandoc=, le didacticiel de J.-D. Bonjour donne de nombreuses explications
sur comment installer et utiliser =Pandoc= dans la section [[https://enacit1.epfl.ch/markdown-pandoc/#commande_pandoc][Utilisation du convertisseur Pandoc]]. Comme
=Pandoc= -- écrit en Haskell -- peut être parfois un peu difficile à installer, nous indiquons
maintenant quelques solutions alternatives :
- Des sites comme [[http://www.markdowntopdf.com/]] et [[http://markdown2pdf.com/]] permettent de convertir
en ligne un fichier =Markdown= en un fichier =pdf=.
- Le projet [[http://commonmark.org/][CommonMark]] propose, en plus d'une spécification plus rigoureuse de la syntaxe =Markdown=,
des convertisseurs =Markdown= → =html= / =LaTeX= (et plus) écrits en =C= et en =JavaScript=
([[https://github.com/CommonMark/CommonMark]]).
- Le site de [[https://daringfireball.net/projects/markdown/][John Gruber]], le créateur de =Markdown=, fournit un convertisseur =Markdown= → =html= écrit en
=Perl=.
- [[http://fletcherpenney.net/multimarkdown/][MultiMarkdown]] est une autre extension de =Markdown= qui vient avec son convertisseur =Markdown= → =html=
écrit en =C=.
- [[https://github.com/joeyespo/grip][grip]] est un serveur écrit en =Python= qui permet de convertir et visualiser à la volée des fichiers
=Markdown= avec son navigateur (très utile pour éviter d'avoir à faire des « commits » en grande
quantité lorsqu'on écrit de tels fichiers pour un dépôt =GitHub= ou =GitLab=).
La conversion en =pdf= passe toujours par [[https://fr.wikipedia.org/wiki/LaTeX][LaTeX]] ce qui nécessite d'avoir une version complète et à
jour de ce logiciel sur sa machine.
Dans la petite démonstration, nous montrons comment générer un fichier =docx= à partir d'un fichier =md=
avec =Pandoc= et nous soulignons qu'il est alors possible d'utiliser un traitement de texte comme
=LibreOffice= pour modifier le fichier obtenu. Il est clair que si des modifications sont apportées au
=docx= elles ne seront pas (automatiquement) propagées au =md=. Il faudra utiliser =Pandoc= pour cela et
effectuer une conversion de =docx= vers =md= (et seuls les éléments du format =docx= qui existent en =md=
seront conservés).
Une stratégie qui est souvent employée et qui fonctionne bien en pratique consiste à faire le gros
du travail de rédaction d'un article ou d'un mémoire en =Markdown=. La rédaction terminée, le fichier
est exporté au format =docx= (ou =LaTeX=) et des ajustements de mise en page sont alors effectués avec
un logiciel de traitement de texte (ou un éditeur =LaTeX=).
This is an R Markdown document that you can easily export to HTML, PDF, and MS Word formats. For more information on R Markdown, see <http://rmarkdown.rstudio.com>.
When you click on the button **Knit**, the document will be compiled in order to re-execute the R code and to include the results into the final document. As we have shown in the video, R code is inserted as follows:
```{r cars}
summary(cars)
```
It is also straightforward to include figures. For example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note the parameter `echo = FALSE` that indicates that the code will not appear in the final version of the document. We recommend not to use this parameter in the context of this MOOC, because we want your data analyses to be perfectly transparent and reproducible.
Since the results are not stored in Rmd files, you should generate an HTML or PDF version of your exercises and commit them. Otherwise reading and checking your analysis will be difficult for anyone else but you.
Now it's your turn! You can delete all this information and replace it by your computational document.
This is an R Markdown document that you can easily export to HTML, PDF, and MS Word formats. For more information on R Markdown, see <http://rmarkdown.rstudio.com>.
When you click on the button **Knit**, the document will be compiled in order to re-execute the R code and to include the results into the final document. As we have shown in the video, R code is inserted as follows:
```{r cars}
summary(cars)
```
It is also straightforward to include figures. For example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note the parameter `echo = FALSE` that indicates that the code will not appear in the final version of the document. We recommend not to use this parameter in the context of this MOOC, because we want your data analyses to be perfectly transparent and reproducible.
Since the results are not stored in Rmd files, you should generate an HTML or PDF version of your exercises and commit them. Otherwise reading and checking your analysis will be difficult for anyone else but you.
Now it's your turn! You can delete all this information and replace it by your computational document.
This is an R Markdown document that you can easily export to HTML, PDF, and MS Word formats. For more information on R Markdown, see <http://rmarkdown.rstudio.com>.
When you click on the button **Knit**, the document will be compiled in order to re-execute the R code and to include the results into the final document. As we have shown in the video, R code is inserted as follows:
```{r cars}
summary(cars)
```
It is also straightforward to include figures. For example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note the parameter `echo = FALSE` that indicates that the code will not appear in the final version of the document. We recommend not to use this parameter in the context of this MOOC, because we want your data analyses to be perfectly transparent and reproducible.
Since the results are not stored in Rmd files, you should generate an HTML or PDF version of your exercises and commit them. Otherwise reading and checking your analysis will be difficult for anyone else but you.
Now it's your turn! You can delete all this information and replace it by your computational document.
This is an R Markdown document that you can easily export to HTML, PDF, and MS Word formats. For more information on R Markdown, see <http://rmarkdown.rstudio.com>.
When you click on the button **Knit**, the document will be compiled in order to re-execute the R code and to include the results into the final document. As we have shown in the video, R code is inserted as follows:
```{r cars}
summary(cars)
```
It is also straightforward to include figures. For example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note the parameter `echo = FALSE` that indicates that the code will not appear in the final version of the document. We recommend not to use this parameter in the context of this MOOC, because we want your data analyses to be perfectly transparent and reproducible.
Since the results are not stored in Rmd files, you should generate an HTML or PDF version of your exercises and commit them. Otherwise reading and checking your analysis will be difficult for anyone else but you.
Now it's your turn! You can delete all this information and replace it by your computational document.
" Date & Count & Temperature & Pressure & Malfunction\\\\\n",
" <fct> & <int> & <int> & <int> & <int>\\\\\n",
"\\hline\n",
"\t 4/12/81 & 6 & 66 & 50 & 0\\\\\n",
"\t 11/12/81 & 6 & 70 & 50 & 1\\\\\n",
"\t 3/22/82 & 6 & 69 & 50 & 0\\\\\n",
"\t 11/11/82 & 6 & 68 & 50 & 0\\\\\n",
"\t 4/04/83 & 6 & 67 & 50 & 0\\\\\n",
"\t 6/18/82 & 6 & 72 & 50 & 0\\\\\n",
"\t 8/30/83 & 6 & 73 & 100 & 0\\\\\n",
"\t 11/28/83 & 6 & 70 & 100 & 0\\\\\n",
"\t 2/03/84 & 6 & 57 & 200 & 1\\\\\n",
"\t 4/06/84 & 6 & 63 & 200 & 1\\\\\n",
"\t 8/30/84 & 6 & 70 & 200 & 1\\\\\n",
"\t 10/05/84 & 6 & 78 & 200 & 0\\\\\n",
"\t 11/08/84 & 6 & 67 & 200 & 0\\\\\n",
"\t 1/24/85 & 6 & 53 & 200 & 2\\\\\n",
"\t 4/12/85 & 6 & 67 & 200 & 0\\\\\n",
"\t 4/29/85 & 6 & 75 & 200 & 0\\\\\n",
"\t 6/17/85 & 6 & 70 & 200 & 0\\\\\n",
"\t 7/29/85 & 6 & 81 & 200 & 0\\\\\n",
"\t 8/27/85 & 6 & 76 & 200 & 0\\\\\n",
"\t 10/03/85 & 6 & 79 & 200 & 0\\\\\n",
"\t 10/30/85 & 6 & 75 & 200 & 2\\\\\n",
"\t 11/26/85 & 6 & 76 & 200 & 0\\\\\n",
"\t 1/12/86 & 6 & 58 & 200 & 1\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A data.frame: 23 × 5\n",
"\n",
"| Date <fct> | Count <int> | Temperature <int> | Pressure <int> | Malfunction <int> |\n",
"|---|---|---|---|---|\n",
"| 4/12/81 | 6 | 66 | 50 | 0 |\n",
"| 11/12/81 | 6 | 70 | 50 | 1 |\n",
"| 3/22/82 | 6 | 69 | 50 | 0 |\n",
"| 11/11/82 | 6 | 68 | 50 | 0 |\n",
"| 4/04/83 | 6 | 67 | 50 | 0 |\n",
"| 6/18/82 | 6 | 72 | 50 | 0 |\n",
"| 8/30/83 | 6 | 73 | 100 | 0 |\n",
"| 11/28/83 | 6 | 70 | 100 | 0 |\n",
"| 2/03/84 | 6 | 57 | 200 | 1 |\n",
"| 4/06/84 | 6 | 63 | 200 | 1 |\n",
"| 8/30/84 | 6 | 70 | 200 | 1 |\n",
"| 10/05/84 | 6 | 78 | 200 | 0 |\n",
"| 11/08/84 | 6 | 67 | 200 | 0 |\n",
"| 1/24/85 | 6 | 53 | 200 | 2 |\n",
"| 4/12/85 | 6 | 67 | 200 | 0 |\n",
"| 4/29/85 | 6 | 75 | 200 | 0 |\n",
"| 6/17/85 | 6 | 70 | 200 | 0 |\n",
"| 7/29/85 | 6 | 81 | 200 | 0 |\n",
"| 8/27/85 | 6 | 76 | 200 | 0 |\n",
"| 10/03/85 | 6 | 79 | 200 | 0 |\n",
"| 10/30/85 | 6 | 75 | 200 | 2 |\n",
"| 11/26/85 | 6 | 76 | 200 | 0 |\n",
"| 1/12/86 | 6 | 58 | 200 | 1 |\n",
"\n"
],
"text/plain": [
" Date Count Temperature Pressure Malfunction\n",
"1 4/12/81 6 66 50 0 \n",
"2 11/12/81 6 70 50 1 \n",
"3 3/22/82 6 69 50 0 \n",
"4 11/11/82 6 68 50 0 \n",
"5 4/04/83 6 67 50 0 \n",
"6 6/18/82 6 72 50 0 \n",
"7 8/30/83 6 73 100 0 \n",
"8 11/28/83 6 70 100 0 \n",
"9 2/03/84 6 57 200 1 \n",
"10 4/06/84 6 63 200 1 \n",
"11 8/30/84 6 70 200 1 \n",
"12 10/05/84 6 78 200 0 \n",
"13 11/08/84 6 67 200 0 \n",
"14 1/24/85 6 53 200 2 \n",
"15 4/12/85 6 67 200 0 \n",
"16 4/29/85 6 75 200 0 \n",
"17 6/17/85 6 70 200 0 \n",
"18 7/29/85 6 81 200 0 \n",
"19 8/27/85 6 76 200 0 \n",
"20 10/03/85 6 79 200 0 \n",
"21 10/30/85 6 75 200 2 \n",
"22 11/26/85 6 76 200 0 \n",
"23 1/12/86 6 58 200 1 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = read.csv(\"shuttle.csv\",header=T)\n",
"data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The data set shows us the date of each test, the number of O-rings (there are 6 on the main launcher), the temperature (in Fahrenheit) and pressure (in psi), and finally the number of identified malfunctions."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Graphical inspection\n",
"Flights without incidents do not provide any information\n",
"on the influence of temperature or pressure on malfunction.\n",
"We thus focus on the experiments in which at least one O-ring\n",
"# Analysis of the risk of failure of the O-rings on the Challenger shuttle"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"On January 27, 1986, the day before the takeoff of the shuttle _Challenger_, had\n",
"a three-hour teleconference was held between \n",
"Morton Thiokol (the manufacturer of one of the engines) and NASA. The\n",
"discussion focused on the consequences of the\n",
"temperature at take-off of 31°F (just below\n",
"0°C) for the success of the flight and in particular on the performance of the\n",
"O-rings used in the engines. Indeed, no test\n",
"had been performed at this temperature.\n",
"\n",
"The following study takes up some of the analyses carried out that\n",
"night with the objective of assessing the potential influence of\n",
"the temperature and pressure to which the O-rings are subjected\n",
"on their probability of malfunction. Our starting point is \n",
"the results of the experiments carried out by NASA engineers\n",
"during the six years preceding the launch of the shuttle\n",
"Challenger."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading the data\n",
"We start by loading this data:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Date</th>\n",
" <th>Count</th>\n",
" <th>Temperature</th>\n",
" <th>Pressure</th>\n",
" <th>Malfunction</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>4/12/81</td>\n",
" <td>6</td>\n",
" <td>66</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>11/12/81</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>50</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3/22/82</td>\n",
" <td>6</td>\n",
" <td>69</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>11/11/82</td>\n",
" <td>6</td>\n",
" <td>68</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>4/04/83</td>\n",
" <td>6</td>\n",
" <td>67</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>6/18/82</td>\n",
" <td>6</td>\n",
" <td>72</td>\n",
" <td>50</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>8/30/83</td>\n",
" <td>6</td>\n",
" <td>73</td>\n",
" <td>100</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>11/28/83</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>100</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2/03/84</td>\n",
" <td>6</td>\n",
" <td>57</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>4/06/84</td>\n",
" <td>6</td>\n",
" <td>63</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>8/30/84</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>10/05/84</td>\n",
" <td>6</td>\n",
" <td>78</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>11/08/84</td>\n",
" <td>6</td>\n",
" <td>67</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>1/24/85</td>\n",
" <td>6</td>\n",
" <td>53</td>\n",
" <td>200</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>4/12/85</td>\n",
" <td>6</td>\n",
" <td>67</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>4/29/85</td>\n",
" <td>6</td>\n",
" <td>75</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>6/17/85</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>7/29/85</td>\n",
" <td>6</td>\n",
" <td>81</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>8/27/85</td>\n",
" <td>6</td>\n",
" <td>76</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>10/03/85</td>\n",
" <td>6</td>\n",
" <td>79</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>10/30/85</td>\n",
" <td>6</td>\n",
" <td>75</td>\n",
" <td>200</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>11/26/85</td>\n",
" <td>6</td>\n",
" <td>76</td>\n",
" <td>200</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>1/12/86</td>\n",
" <td>6</td>\n",
" <td>58</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Date Count Temperature Pressure Malfunction\n",
"0 4/12/81 6 66 50 0\n",
"1 11/12/81 6 70 50 1\n",
"2 3/22/82 6 69 50 0\n",
"3 11/11/82 6 68 50 0\n",
"4 4/04/83 6 67 50 0\n",
"5 6/18/82 6 72 50 0\n",
"6 8/30/83 6 73 100 0\n",
"7 11/28/83 6 70 100 0\n",
"8 2/03/84 6 57 200 1\n",
"9 4/06/84 6 63 200 1\n",
"10 8/30/84 6 70 200 1\n",
"11 10/05/84 6 78 200 0\n",
"12 11/08/84 6 67 200 0\n",
"13 1/24/85 6 53 200 2\n",
"14 4/12/85 6 67 200 0\n",
"15 4/29/85 6 75 200 0\n",
"16 6/17/85 6 70 200 0\n",
"17 7/29/85 6 81 200 0\n",
"18 8/27/85 6 76 200 0\n",
"19 10/03/85 6 79 200 0\n",
"20 10/30/85 6 75 200 2\n",
"21 11/26/85 6 76 200 0\n",
"22 1/12/86 6 58 200 1"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"data = pd.read_csv(\"shuttle.csv\")\n",
"data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The data set shows us the date of each test, the number of O-rings (there are 6 on the main launcher), the temperature (in Fahrenheit) and pressure (in psi), and finally the number of identified malfunctions."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Graphical inspection\n",
"Flights without incidents do not provide any information\n",
"on the influence of temperature or pressure on malfunction.\n",
"We thus focus on the experiments in which at least one O-ring\n",
"was defective."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Date</th>\n",
" <th>Count</th>\n",
" <th>Temperature</th>\n",
" <th>Pressure</th>\n",
" <th>Malfunction</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>11/12/81</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>50</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2/03/84</td>\n",
" <td>6</td>\n",
" <td>57</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>4/06/84</td>\n",
" <td>6</td>\n",
" <td>63</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>8/30/84</td>\n",
" <td>6</td>\n",
" <td>70</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>1/24/85</td>\n",
" <td>6</td>\n",
" <td>53</td>\n",
" <td>200</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>10/30/85</td>\n",
" <td>6</td>\n",
" <td>75</td>\n",
" <td>200</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>1/12/86</td>\n",
" <td>6</td>\n",
" <td>58</td>\n",
" <td>200</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Date Count Temperature Pressure Malfunction\n",
"1 11/12/81 6 70 50 1\n",
"8 2/03/84 6 57 200 1\n",
"9 4/06/84 6 63 200 1\n",
"10 8/30/84 6 70 200 1\n",
"13 1/24/85 6 53 200 2\n",
"20 10/30/85 6 75 200 2\n",
"22 1/12/86 6 58 200 1"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data = data[data.Malfunction>0]\n",
"data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have a high temperature variability but\n",
"the pressure is almost always 200, which should\n",
"simplify the analysis.\n",
"\n",
"How does the frequency of failure vary with temperature?"