From 097f244236b682cc77c6ecf25be4150091d8daf9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 2 Oct 2022 03:04:14 +0000 Subject: CTAN sync 202210020304 --- .../latex/contrib/proflycee/doc/ProfLycee-doc.pdf | Bin 834268 -> 852659 bytes .../latex/contrib/proflycee/doc/ProfLycee-doc.tex | 208 ++++++++++++++++++++- 2 files changed, 198 insertions(+), 10 deletions(-) (limited to 'macros/latex/contrib/proflycee/doc') diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf index 9ad760140f..fb6a67967d 100644 Binary files a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf and b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf differ diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index d653c2ac21..237021230d 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -21,9 +21,6 @@ %fancy \fancyhf{} \renewcommand{\headrulewidth}{0pt} -%\lhead{\sffamily \small [ProfLycee]} -%\chead{\entete{\classe{} - \annee}} -%\rhead{\sffamily \small - \thepage{} -} \lfoot{\sffamily \small [ProfLycee]} \cfoot{\sffamily \small - \thepage{} -} \rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} @@ -60,8 +57,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\PLversion{1.2.6} -\def\PLdate{22 Septembre 2022} +\def\PLversion{1.2.7} +\def\PLdate{1\ier{} Octobre 2022} \tcbset{vignettes/.style={% nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,% @@ -235,6 +232,8 @@ Une commande pour, en \TikZ, créer un pixelart avec correction éventuelle. Une commande pour, en \TikZ, créer un SudoMaths non forcément $9\times9$. +Des commandes pour effectuer des calculs de probas (lois binomiale, exponentielle, de Poisson, normale). + \vspace{1.5cm} \hfill{}\textit{Merci à Anne pour ses retours et sa relecture !} @@ -1536,13 +1535,13 @@ Peu d'options pour ces commandes : \end{codecles} \begin{codetex}[listing only] -\liencapytale{abcd-12345} #lien simple, en sf +\liencapytale{abcd-12345} %lien simple, en sf -\liencapytale[~]{abcd-12345} #lien avec ~ à la fin, en sf +\liencapytale[~]{abcd-12345} %lien avec ~ à la fin, en sf -\liencapytale*{abcd-12345} #lien simple, en tt +\liencapytale*{abcd-12345} %lien simple, en tt -\liencapytale*[~]{abcd-12345} #lien avec ~ à la fin, en tt +\liencapytale*[~]{abcd-12345} %lien avec ~ à la fin, en tt \end{codetex} \begin{codesortie} @@ -3127,7 +3126,7 @@ Cette commande permet de rajouter le point moyen du nuage, calculé par la comma \item \Cle{couleur}, couleur du point moyen ; \hfill~défaut \Cle{red} \item \Cle{style} parmi \Cle{o} (rond) ou \Cle{x} (croix) ou \Cle{+} (plus) ; \hfill~défaut \Cle{o} \item \Cle{xg}, abscisse du point moyen, récupérable via \ctex{PLRegLin} ; \hfill~défaut \Cle{\textbackslash{}LXmoy} - \item \Cle{xy}, abscisse du point moyen, récupérable via \ctex{PLRegLin} ; \hfill~défaut \Cle{\textbackslash{}LYmoy} + \item \Cle{yg}, ordonnée du point moyen, récupérable via \ctex{PLRegLin} ; \hfill~défaut \Cle{\textbackslash{}LYmoy} \item \Cle{nom}, label du point moyen ; \hfill~défaut \Cle{G} \item \Cle{pos} qui est la position du label par rapport au point ; \hfill~défaut \Cle{above} \item \Cle{decal} qui est l'éloignement de la position du label par rapport au point ; \hfill~défaut \Cle{0pt} @@ -3368,6 +3367,193 @@ Sachant que la hauteur par défaut est de 1, il est -- a priori -- intéressant \newpage +\section{Calculs de probabilités}\label{calcprobas} + +\subsection{Introduction} + +\begin{codeidee} +L'idée est de proposer des commandes permettant de calculer des probabilités avec des lois classiques : + +\begin{itemize} + \item binomiale ; + \item normale ; + \item exponentielle ; + \item de Poisson +\end{itemize} +\end{codeidee} + +\begin{codeinfo} +Les commandes sont de deux natures : + +\begin{itemize} + \item des commandes pour calculer, grâce au package \ctex{xintexpr} ; + \item des commandes pour formater le résultat de \ctex{xintexpr}, grâce à \ctex{siunitx}. +\end{itemize} + +De ce fait, les options de \ctex{siunitx} de l'utilisateur affecterons les formatage du résultat, la commande va \og forcer \fg{} les arrondis et l'écriture scientifique. +\end{codeinfo} + +\subsection{Calculs \og simples \fg} + +\begin{codetex}[listing only] +%loi binomiale B(n,p) +\calcPbinomP{n}{p}{k} %P(X=k) +\calcPbinomC{n}{p}{a}{b} %P(a<=X<=b) +%loi de Poisson P (l) +\calcPpoissP{l}{k} %P(X=k) +\calcPpoissC{l}{a}{b} %P(a<=X<=b) +%loi normale N(m,s) +\calcPnormC{m}{s}{a}{b} %P(a<=X<=b) +%loi exponentielle E(l) +\calcPexpoC{l}{a}{b} %P(a<=X<=b) +\end{codetex} + +\begin{codecles} +Les probabilités calculables sont donc -- comme pour beaucoup de modèles de calculatrices -- les probabilités \textbf{P}onctuelles ($P(X=k)$) et \textbf{C}umulées ($P(a\leqslant X\leqslant b)$). + +\smallskip + +Pour les probabilités cumulées, on peut utiliser \ctex{*} comme borne ($a$ ou $b$), pour les probabilités du type $P(X\leqslant b)$ et $P(X \geqslant a)$. +\end{codecles} + +\begin{codetex}[listing only] +% X -> B(5,0.4) +$P(X=3) \approx \calcPbinomP{5}{0.4}{3}$. +$P(X\leqslant1) \approx \calcPbinomC{5}{0.4}{*}{1}$. +% X -> B(100,0.02) +$P(X=10) \approx \calcPbinomP{100}{0.02}{10}$. +$P(15\leqslant X\leqslant25) \approx \calcPbinomC{100}{0.02}{15}{25}$. +% Y -> P(5) +$P(Y=3) \approx \calcPpoissP{5}{3}$. +$P(Y\geqslant2) \approx \calcPpoissC{5}{2}{*}$. +% X -> N(0,1) +$P(X\leqslant1) \approx \calcPnormC{0}{1}{*}{1}$. +$P(-1,96\leqslant Z\leqslant1,96) \approx \calcPnormC{0}{1}{-1.96}{1.96}$. +% X -> N(550,30) +$P(Y\geqslant600) \approx \calcPnormC{550}{30}{600}{*}$. +$P(500\leqslant Y\leqslant600) \approx \calcPnormC{550}{30}{500}{600}$. +% Z -> E(0.001) +$P(Z\geqslant400) \approx \calcPexpoC{0.001}{400}{*}$. +$P(300\leqslant Z\leqslant750) \approx \calcPexpoC{0.001}{300}{750}$. +\end{codetex} + +\begin{codesortie} +$\bullet~~~~X \hookrightarrow \mathcal{B}(5\,;\,0,4)$ :\\ +$P(X=3) \approx \calcPbinomP{5}{0.4}{3}$.\\ +$P(X\leqslant1) \approx \calcPbinomC{5}{0.4}{*}{1}$. + +\medskip + +$\bullet~~~~X \hookrightarrow \mathcal{B}(100\,;\,0,02)$ :\\ +$P(X=10) \approx \calcPbinomP{100}{0.02}{10}$.\\ +$P(15\leqslant X\leqslant25) \approx \calcPbinomC{100}{0.02}{15}{25}$. + +\medskip + +$\bullet~~~~Y \hookrightarrow \mathcal{P}_5$ :\\ +$P(Y=3) \approx \calcPpoissP{5}{3}$.\\ +$P(Y\geqslant2) \approx \calcPpoissC{5}{2}{*}$. + +\medskip + +$\bullet~~~~X \hookrightarrow \mathcal{N}(0\,;\,1)$ :\\ +$P(X\leqslant1) \approx \calcPnormC{0}{1}{*}{1}$.\\ +$P(-1,96\leqslant Z\leqslant1,96) \approx \calcPnormC{0}{1}{-1.96}{1.96}$. + +\medskip + +$\bullet~~~~Y \hookrightarrow \mathcal{N}(550\,;\,30)$ :\\ +$P(Y\geqslant600) \approx \calcPnormC{550}{30}{600}{*}$.\\ +$P(500\leqslant Y\leqslant600) \approx \calcPnormC{550}{30}{500}{600}$. + +\medskip + +$\bullet~~~~Z \hookrightarrow \mathcal{E}_{0,001}$ :\\ +$P(Z\geqslant400) \approx \calcPexpoC{0.001}{400}{*}$.\\ +$P(300\leqslant Z\leqslant750) \approx \calcPexpoC{0.001}{300}{750}$. +\end{codesortie} + +\subsection{Complément avec sortie \og formaté \fg} + +\begin{codeidee} +L'idée est ensuite de formater le résultat obtenu par \ctex{xintexpr}, pour un affichage homogène. + +\smallskip + +L'utilisateur peut donc utiliser \og sa \fg{} méthode pour formater les résultats obtenus par \ctex{xintexpr} ! +\end{codeidee} + +\begin{codetex}[listing only] +%avec un formatage manuel +\num[exponent-mode=scientific]{\calcPbinomP{100}{0.02}{10}} +\end{codetex} + +\begin{codesortie} +$\bullet~~~~X \hookrightarrow \mathcal{B}(100\,;\,0,02)$ : + +$P(X=10) \approx \num[exponent-mode=scientific]{\calcPbinomP{100}{0.02}{10}}$. +\end{codesortie} + +\begin{codeidee} +Le package \ctex{ProfLycee} propose -- en complément -- des commandes pour formater, grâce à \ctex{siunitx}, le résultat. + +Les commandes sont dans ce cas préfixées par \ctex{num} au lieu de \ctex{calc} : + +\begin{itemize} + \item formatage sous forme décimale \textit{pure} : $0,00\ldots$ ; + \item formatage sous forme scientifique : $n,\ldots\times10^{\ldots}$. +\end{itemize} +\end{codeidee} + +\begin{codetex}[listing only] +%loi binomiale B(n,p) +\numPbinomP(*)[prec]{n}{p}{k} %P(X=k) +\numPbinomC(*)[prec]{n}{p}{a}{b} %P(a<=X<=b) +%loi de Poisson P (l) +\numPpoissP(*)[prec]{l}{k} %P(X=k) +\numPpoissC(*)[prec]{l}{a}{b} %P(a<=X<=b) +%loi normale N(m,s) +\numPnormC(*)[prec]{m}{s}{a}{b} %P(a<=X<=b) +%loi exponentielle E(l) +\numPexpoC(*)[prec]{l}{a}{b} %P(a<=X<=b) +\end{codetex} + +\begin{codecles} +Quelques précisions sur les commandes précédentes : + +\begin{itemize} + \item la version étoilée \Cle{*} des commandes formate le résultat en mode scientifique ; + \item l'argument optionnel (par défaut \Cle{3}) correspond à quant à lui à l'arrondi. +\end{itemize} +\end{codecles} + +\begin{codetex}[listing only] +% X -> N(550,30) +$P(Y\geqslant600) \approx \numPnormC[4]{550}{30}{600}{*}$. +$P(500\leqslant Y\leqslant600) \approx \numPnormC[4]{550}{30}{500}{600}$. +% X -> B(100,0.02) +$P(X=10) \approx \numPbinomP[7]{100}{0.02}{10} \approx \numPbinomP*[7]{100}{0.02}{10}$. +$P(15\leqslant X\leqslant25) \approx \numPbinomC[10]{100}{0.02}{15}{25} \approx \numPbinomC*[10]{100}{0.02}{15}{25}$. +\end{codetex} + +\begin{codesortie} +$\bullet~~~~Y \hookrightarrow \mathcal{N}(550\,;\,30)$ : + +$P(Y\geqslant600) \approx \numPnormC[4]{550}{30}{600}{*}$. + +$P(500\leqslant Y\leqslant600) \approx \numPnormC[4]{550}{30}{500}{600}$. + +\medskip + +$\bullet~~~~X \hookrightarrow \mathcal{B}(100\,;\,0,02)$ : + +$P(X=10) \approx \numPbinomP[7]{100}{0.02}{10} \approx \numPbinomP*[7]{100}{0.02}{10}$. + +$P(15\leqslant X\leqslant25) \approx \numPbinomC[10]{100}{0.02}{15}{25} \approx \numPbinomC*[10]{100}{0.02}{15}{25}$. +\end{codesortie} + +\newpage + \section{Conversions binaire/hexadécimal/décimal} \subsection{Idée} @@ -4129,6 +4315,8 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0 \section{Historique} +{\small \bverb|v1.2.7|~:~~~~Ajout de commandes pour des calculs de probabilités (page \pageref{calcprobas}) + {\small \bverb|v1.2.6|~:~~~~Ajout d'un environnement pour des SudoMaths (page \pageref{sudomaths}) {\small \bverb|v1.2.5|~:~~~~Ajout de commandes pour des boîtes à moustaches (page \pageref{boiteamoustaches}) -- cgit v1.2.3