texlive[64745] Master/texmf-dist: proflycee (17oct22)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 18 22:55:39 CEST 2022


Revision: 64745
          http://tug.org/svn/texlive?view=revision&revision=64745
Author:   karl
Date:     2022-10-18 22:55:39 +0200 (Tue, 18 Oct 2022)
Log Message:
-----------
proflycee (17oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
    trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
    trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png
    trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png

Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex	2022-10-18 20:55:39 UTC (rev 64745)
@@ -63,8 +63,8 @@
 \setlength{\parindent}{0pt}
 \definecolor{LightGray}{gray}{0.9}
 
-\def\PLversion{1.3.3}
-\def\PLdate{12 Octobre 2022}
+\def\PLversion{1.3.5}
+\def\PLdate{17 Octobre 2022}
 
 \tcbset{vignettes/.style={%
 		nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
@@ -355,6 +355,10 @@
 En compilant (notamment avec les packages \ctex{minted} et \ctex{pythontex}) on peut spécifier des répertoires particuliers pour les (ou des) fichiers auxiliaires.
 
 Avec l'option \Cle{build}, l'utilisateur a la possibilité de placer les fichiers temporaires de \ctex{minted} et \ctex{pythontex} dans un répertoire \textsf{build} du répertoire courant.
+
+\smallskip
+
+Dans ce cas il vaut mieux créer au préalable le répertoire \textsf{build} avant de compiler un fichier !
 \end{codeinfo}
 
 \begin{codetex}[listing only]
@@ -637,7 +641,7 @@
 Le plus \og simple \fg{} est donc:
 %
 \begin{itemize}
-	\item de déclarer la liste des points de contrôle, grâce à \ctex{\textbackslash def\textbackslash LISTE\{x1/y1:d1§x2/y2/d2§...\}} ;
+	\item de déclarer la liste des points de contrôle, grâce à \ctex{\textbackslash def\textbackslash LISTE\{x1/y1/d1§x2/y2/d2§...\}} ;
 	\item de  saisir la commande \ctex{\textbackslash splinetikz[liste=\textbackslash LISTE]} ;
 	\item d'ajuster les options et coefficients en fonction du rendu !
 \end{itemize}
@@ -915,7 +919,7 @@
 \begin{center}
 	\begin{tikzpicture}[x=5cm,y=1.5cm]
 			...
-			\def\f{-0.25*\x*\x+\x}
+			\def\f{1+1/\x}
 			\recurrPL%
 				[fct={\f},no=0,uno=1,nb=7,poslabel=above right,decallabel=0pt,afftermes=false]%
 				[line width=1.25pt,ForestGreen,densely dashed][]
@@ -1095,7 +1099,7 @@
 \subsection{Présentation de code Python grâce à listings}
 
 \begin{codeidee}
-L'environnement \ctex{\textbackslash envcodepython} (chargé par \ctex{ProfLycee} permet de présenter du code python, dans une \ctex{tcolorbox} avec un style particulier.
+L'environnement \ctex{\textbackslash envcodepython} permet de présenter du code python, dans une \ctex{tcolorbox} avec un style particulier.
 \end{codeidee}
 
 \begin{codetex}[listing only]
@@ -1141,7 +1145,7 @@
 \begin{codetex}[listing only]
 \begin{envcodepython}{} %les {}, même vides, sont nécessaires (bug avec # sinon !)
 #environnement par défaut
-nb = int(input("Saisir un entier Python positif"))
+nb = int(input("Saisir un entier positif"))
 if (nb %7 == 0) :
 	print(f"{nb} est bien divisible par 7")
 #endif
@@ -1154,7 +1158,7 @@
 \begin{codesortie}
 \begin{envcodepython}{}
 #environnement par défaut
-nb = int(input("Saisir un entier Python positif"))
+nb = int(input("Saisir un entier positif"))
 if (nb %7 == 0) :
 	print(f"{nb} est bien divisible par 7")
 #endif
@@ -1269,11 +1273,11 @@
 \end{itemize}
 \end{codeidee}
 
-\begin{codeinfo}
+\begin{codeattention}
 \textbf{Attention : }il faut dans ce cas une compilation en plusieurs étapes, comme par exemple \textsf{pdflatex puis pythontex puis pdflatex} !
 
 Voir par exemple \url{http://lesmathsduyeti.fr/fr/informatique/latex/pythontex/} !
-\end{codeinfo}
+\end{codeattention}
 
 \begin{codeinfo}
 Compte tenu de la \textit{relative complexité} pour gérer les options (par paramètres/clés\ldots) des \textit{tcbox} et des \textit{fancyvrb}, le style est \og fixé \fg{} tel quel, et seules la taille et la position de la \textit{tcbox} sont modifiables. Si toutefois vous souhaitez personnaliser davantage, il faudra prendre le code correspondant et appliquer vos modifications !
@@ -1284,7 +1288,7 @@
 \subsection{Présentation de code Python via pythontex}\label{pythontex}
 
 \begin{codeidee}
-L'environnement \ctex{\textbackslash envcodepythontex} (chargé par \ctex{ProfLycee}, avec l'option \textit{autogobble}) permet de présenter du code python, dans une \ctex{tcolorbox} avec un style particulier.
+L'environnement \ctex{\textbackslash envcodepythontex} est donc lié à \ctex{pythontex} (chargé par \ctex{ProfLycee}, avec l'option \textit{autogobble}) permet de présenter du code python, dans une \ctex{tcolorbox} avec un style particulier.
 \end{codeidee}
 
 \begin{codetex}[listing only]
@@ -2103,9 +2107,9 @@
 
 \newpage
 
-\part{Outils pour les probabilités et les statistiques}\label{reglin}
+\part{Outils pour les statistiques}
 
-\section{Paramètres d'une régression linéaire par la méthode des moindres carrés}
+\section{Paramètres d'une régression linéaire par la méthode des moindres carrés}\label{reglin}
 
 \subsection{Idée}
 
@@ -3033,6 +3037,8 @@
 
 \newpage
 
+\part{Outils pour les probabilités}
+
 \section{Calculs de probabilités}\label{calcprobas}
 
 \subsection{Introduction}
@@ -3044,7 +3050,9 @@
 	\item binomiale ;
 	\item normale ;
 	\item exponentielle ;
-	\item de Poisson
+	\item de Poisson ;
+	\item géométrique ;
+	\item hypergéométrique.
 \end{itemize}
 \end{codeidee}
 
@@ -3063,15 +3071,26 @@
 
 \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)
+\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)
+\calcPpoissP{l}{k}                %P(X=k)
+\calcPpoissC{l}{a}{b}             %P(a<=X<=b)
+
+%loi géométrique G (p)
+\calcPgeomP{p}{k}                 %P(X=k)
+\calcPgeomC{l}{a}{b}              %P(a<=X<=b)
+
+%loi hypergéométrique H (N,n,m)
+\calcPhypergeomP{N}{n}{m}{k}      %P(X=k)
+\calcPhypergeomP{N}{n}{m}{a}{b}   %P(a<=X<=b)
+
 %loi normale N(m,s)
-\calcPnormC{m}{s}{a}{b}       %P(a<=X<=b)
+\calcPnormC{m}{s}{a}{b}           %P(a<=X<=b)
+
 %loi exponentielle E(l)
-\calcPexpoC{l}{a}{b}          %P(a<=X<=b)
+\calcPexpoC{l}{a}{b}              %P(a<=X<=b)
 \end{codetex}
 
 \begin{codecles}
@@ -3086,24 +3105,25 @@
 % 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}$.
+
+% T -> G(0.5)
+$P(T=100) \approx \calcPgeomP{0.5}{3}$.
+$P(T\leqslant5) \approx \calcPgeomC{0.5}{*}{5}$.
+
+% W -> H(50,10,5)
+$P(W=4) \approx \calcPhypergeomP{50}{10}{5}{4}$.
+$P(1\leqslant W\leqslant3) \approx \calcPhypergeomP{50}{10}{5}{1}{3}$.
 \end{codetex}
 
-\begin{codesortie}
+\begin{codesortie}[listing only]
 $\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}$.
@@ -3122,6 +3142,32 @@
 
 \medskip
 
+$\bullet~~~~T \hookrightarrow \mathcal{G}_{0,5}$ :\\
+$P(T=3) \approx \calcPgeomP{0.5}{3}$.\\
+$P(T\leqslant5) \approx \calcPgeomC{0.5}{*}{5}$.
+
+\medskip
+
+$\bullet~~~~W \hookrightarrow \mathcal{H}(50\,;\,10\,;\,5)$ :\\
+$P(W=4) \approx \calcPhypergeomP{50}{10}{5}{4}$.\\
+$P(1\leqslant W\leqslant3) \approx \calcPhypergeomC{50}{10}{5}{1}{3}$.
+\end{codesortie}
+
+\begin{codetex}[listing only]
+% 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{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}$.
@@ -3175,11 +3221,22 @@
 %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 géométrique G (p)
+\numPgeomP{p}{k}                      %P(X=k)
+\numPgeomC{l}{a}{b}                   %P(a<=X<=b)
+
+%loi hypergéométrique H (N,n,m)
+\numPhypergeomP{N}{n}{m}{k}           %P(X=k)
+\numPhypergeomC{N}{n}{m}{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}
@@ -3200,6 +3257,15 @@
 % 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}$.
+% H -> H(50,10,5)
+$P(W=4) \approx \numPhypergeomP[5]{50}{10}{5}{4}$.
+$P(1\leqslant W\leqslant3) \approx \numPhypergeomC[4]{50}{10}{5}{1}{3}$.
+% Z-> E(0,001)$ :
+$P(Z\geqslant400) \approx \numPexpoC{0.001}{400}{*}$.
+$P(300\leqslant Z\leqslant750) \approx \numPexpoC{0.001}{300}{750}$.
+% T -> P(5)
+$P(T=3) \approx \numPpoissP{5}{3}$.
+$P(T\geqslant2) \approx \numPpoissC[4]{5}{2}{*}$.
 \end{codetex}
 
 \begin{codesortie}
@@ -3216,8 +3282,36 @@
 $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}$.
+
+\medskip
+
+$\bullet~~~~W \hookrightarrow \mathcal{H}(50\,;\,10\,;\,5)$ :
+
+$P(W=4) \approx \numPhypergeomP[5]{50}{10}{5}{4}$.
+
+$P(1\leqslant W\leqslant3) \approx \numPhypergeomC[4]{50}{10}{5}{1}{3}$.
+
+\medskip
+
+$\bullet~~~~Z \hookrightarrow \mathcal{E}_{0,001}$ :
+
+$P(Z\geqslant400) \approx \numPexpoC{0.001}{400}{*}$.
+
+$P(300\leqslant Z\leqslant750) \approx \numPexpoC{0.001}{300}{750}$.
+
+\medskip
+
+$\bullet~~~~T \hookrightarrow \mathcal{P}_5$ :
+
+$P(T=3) \approx \numPpoissP{5}{3}$.
+
+$P(T\geqslant2) \approx \numPpoissC[4]{5}{2}{*}$.
 \end{codesortie}
 
+\begin{codeinfo}
+\hfill~\includegraphics[height=3cm]{./graphics/pl-doc-probas_a}~~\includegraphics[height=3cm]{./graphics/pl-doc-probas_c}~~\includegraphics[height=3cm]{./graphics/pl-doc-probas_e}~~\includegraphics[height=3cm]{./graphics/pl-doc-probas_f}\hfill~
+\end{codeinfo}
+
 \newpage
 
 \section{Arbres de probabilités \og classiques \fg}\label{arbresprobas}
@@ -3251,7 +3345,7 @@
 Les \Cle{donnees} seront à préciser sous forme \ctex{<sommet1>/<proba1>/<position1>,<sommet2>/<proba2>/<position2>,...} avec comme \og sens de lecture \fg{} de la gauche vers la droite puis du haut vers le bas (on balaye les \textit{sous-arbres}), avec comme possibilités :
 
 \begin{itemize}
-	\item une donnée \Cle{<proba>} peuvent être laissé vide ;
+	\item une donnée \Cle{<proba>} peut être laissée vide ;
 	\item une donnée \Cle{<position>} peut valoir \Cle{above} (au-dessus), \Cle{below} (en-dessous) ou être laissée \Cle{vide} (sur).
 \end{itemize}
 \end{codeinfo}
@@ -3380,6 +3474,88 @@
 
 \newpage
 
+\section{Petits schémas pour des probabilités continues}\label{schemasprobas}
+
+\subsection{Idée}
+
+\begin{codeidee}
+L'idée est de proposer des commandes pour illustrer, sous forme de schémas en \TikZ, des probabilités avec des lois continues (normales et exponentielles).
+
+\smallskip
+
+Ces \og schémas \fg{} peuvent être insérés en tant que graphique explicatif, ou bien en tant que petite illustration rapide !
+\end{codeidee}
+
+\begin{codetex}[listing only]
+\LoiNormaleGraphe[options]<options tikz>{m}{s}{a}{b}
+
+\LoiExpoGraphe[options]<options tikz>{l}{a}{b}
+\end{codetex}
+
+\begin{codesortie}
+\hfill\LoiNormaleGraphe{100}{20}{80}{120}\hspace{3cm}\LoiExpoGraphe{0.001}{250}{1500}\hfill~
+\end{codesortie}
+
+\begin{codecles}
+Les probabilités \textit{illustrables} sont donc des probabilités \textbf{C}umulées ($P(a\leqslant X\leqslant b)$).
+
+\smallskip
+
+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}
+
+\subsection{Commandes et options}
+
+\begin{codecles}
+Quelques \Cle{Clés} sont disponibles pour ces commandes :
+
+\begin{itemize}
+	\item la clé \Cle{CouleurAire} pour l'aire sous la courbe ; \hfill{}défaut \Cle{LightGray}
+	\item la clé \Cle{CouleurCourbe} pour la courbe ; \hfill{}défaut \Cle{red}
+	\item la clé \Cle{Largeur} qui sera la largeur (en cm) du graphique ; \hfill{}défaut \Cle{2}
+	\item la clé \Cle{Hauteur} qui sera la hauteur (en cm) du graphique ; \hfill{}défaut \Cle{1}
+	\item un booléen \Cle{AfficheM} qui affiche la moyenne ; \hfill{}défaut \Cle{true}
+	\item un booléen \Cle{AfficheCadre} qui affiche un cadre pour délimiter le schéma. \hfill{}défaut \Cle{true}
+\end{itemize}
+\end{codecles}
+
+\begin{codeinfo}
+Les commandes sont donc des environnements \TikZ, sans possibilité de \og rajouter \fg{} des éléments. Ces petis \textit{schémas} sont donc vraiment dédiés à \textit{montrer} rapidement une probabilité continue, sans fioriture.
+\end{codeinfo}
+
+\begin{codetex}
+Avec centrage vertical sur l'axe des abscisses :
+\LoiNormaleGraphe[AfficheM=false,CouleurCourbe=Blue,CouleurAire=LightBlue]<baseline=0pt>{1000}{100}{950}{*}
+\end{codetex}
+
+\begin{codetex}
+Avec quelques modifications :
+
+\LoiNormaleGraphe[Largeur=4,Hauteur=2]{150}{12.5}{122}{160}
+
+\medskip
+
+Avec centrage vertical :
+\LoiNormaleGraphe[Largeur=5,Hauteur=2.5]<baseline=(current bounding box.center)>{200}{5}{204}{*}
+
+\medskip
+
+Avec centrage vertical sur l'axe des abscisses :
+\LoiExpoGraphe[AfficheM=false,CouleurCourbe=Blue,CouleurAire=LightBlue]<baseline=0pt>{0.05}{*}{32}
+
+\medskip
+
+\LoiExpoGraphe[Largeur=4,Hauteur=2]{0.00025}{5000}{*}
+\end{codetex}
+
+\subsection{Remarques et compléments}
+
+\begin{codeinfo}
+Pour le moment, seules les lois (continues) exponentielles et normales sont disponibles, peut-être que d'autres lois seront ajoutées, mais il ne me semble pas très pertinent de proposer des schémas similaires pour des lois discrètes, qui ont des \textit{représentations} assez variables\ldots
+\end{codeinfo}
+
+\newpage
+
 \part{Outils divers et variés}
 
 \section{Fractions, ensembles}
@@ -3831,7 +4007,7 @@
 $\PLconvdecbin*[affbase=false]{415}$
 \end{codesortie}
 
-\subsection{Conversion hexadécimal vers binaire}
+\subsection{Conversion binaire vers hexadécimal}
 
 \begin{codeinfo}
 L'idée est ici de présenter la conversion, grâce à la conversion \og directe \fg{} par blocs de 4 chiffres :
@@ -4598,6 +4774,12 @@
 
 \part{Historique}
 
+{\small \bverb|v1.3.5|~:~~~~Correction d'un bug avec la loi géométrique (page \pageref{calcprobas})
+	
+{\small \bverb|v1.3.4|~:~~~~Ajout de petits schémas, en \TikZ{}, de lois normales et exponentielles (page \pageref{schemasprobas})
+
+{\small \bverb|      |~:~~~~Calculs de probas avec les lois géométriques et hypergéométriques (page \pageref{calcprobas})
+	
 {\small \bverb|v1.3.3|~:~~~~Ajout d'un environnement pour des arbres de probas classiques, en \TikZ{} (page \pageref{arbresprobas})
 	
 {\small \bverb|v1.3.2|~:~~~~Correction d'un bug sur les conversions bintohex avec lualatex (page \pageref{conversions})

Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_a.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_b.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_c.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_d.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_e.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png	2022-10-18 20:55:39 UTC (rev 64745)

Property changes on: trunk/Master/texmf-dist/doc/latex/proflycee/pl-doc-probas_f.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty	2022-10-18 20:55:16 UTC (rev 64744)
+++ trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty	2022-10-18 20:55:39 UTC (rev 64745)
@@ -3,9 +3,11 @@
 % or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2022/10/12 v1.3.3 - Aide pour l'utilisation de LaTeX en lycee]
-% 1.3.2	Ajout de commandes pour des arbres de probas classiques, en tikz
-% 1.3.1	Correction d'une commande liée à la conversion bintohex (suppression clé trait)
+\ProvidesPackage{ProfLycee}[2022/10/17 v1.3.5 - Aide pour l'utilisation de LaTeX en lycee]
+% 1.3.5	Correction de bugs sur les calculs de probas (loi géométrique)
+% 1.3.4	Ajout des calculs de probas geomtriques et hypergeometriques + petits schémas probas
+% 1.3.3	Ajout de commandes pour des arbres de probas classiques, en tikz
+% 1.3.2	Correction d'une commande liée à la conversion bintohex (suppression clé trait)
 % 1.3.1	Ajout d'une option pour ne pas afficher les bords des cases en pixelart
 % 1.3.0	Ajout d'une commande pour mettre en forme une conversion depuis la base 10
 % 1.2.9	Correction d'une incompatibilité avec simplekv (clés vides...)
@@ -2240,6 +2242,32 @@
 		{}
 	\xintFloatToDecimal{\xintfloateval{add(binomial(#1,i)*#2^i*(1-#2)^(#1-i), i=\BorneInf..\BorneSup)}}
 }
+\newcommand\calcPgeomP[2]{%pk
+	\xintFloatToDecimal{\xintfloateval{(1-#1)^(#2-1)*(#1)}}
+}
+\newcommand\calcPgeomC[3]{%pab
+	\def\BorneInf{#2}\def\BorneSup{#3}
+	\ifthenelse{\equal{#2}{*}}%
+		{\def\BorneInf{1}}
+		{}
+	\ifthenelse{\equal{#3}{*}}%
+		{\def\BorneSup{\fpeval{trunc(1/#1*10,0)}}}
+		{}
+	\xintFloatToDecimal{\xintfloateval{add((1-#1)^(i-1)*(#1), i=\BorneInf..\BorneSup)}}
+}
+\newcommand\calcPhypergeomP[4]{%Nnmk
+	\xintFloatToDecimal{\xintfloateval{binomial(#3,#4)*binomial(#1-#3,#2-#4)/binomial(#1,#2)}}
+}
+\newcommand\calcPhypergeomC[5]{%Nnmab
+	\def\BorneInf{#4}\def\BorneSup{#5}
+	\ifthenelse{\equal{#4}{*}}%
+		{\def\BorneInf{0}}
+		{}
+	\ifthenelse{\equal{#5}{*}}%
+		{\def\BorneSup{#1}}
+		{}
+	\xintFloatToDecimal{\xintfloateval{add(binomial(#3,i)*binomial(#1-#3,#2-i)/binomial(#1,#2), i=\BorneInf..\BorneSup)}}
+}
 \newcommand\calcPpoissP[2]{%lk
 	\xintFloatToDecimal{\xintfloateval{exp(-#1)*#1^#2/factorial(#2)}}
 }
@@ -2312,6 +2340,60 @@
 	}
 }
 
+\NewDocumentCommand{\numPgeomP}{ s O{3} m m }{%*=sci,2=prec,3=p,4=k
+	\IfBooleanTF{#1}%
+	{%
+		\num[exponent-mode=scientific]{\xintFloatToDecimal{\xintfloateval{round((1-#3)^(#4-1)*(#3),#2)}}}
+	}%
+	{%
+		\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round((1-#3)^(#4-1)*(#3),#2)}}}
+	}
+}
+
+\NewDocumentCommand{\numPgeomC}{ s O{3} m m m }{%*=sci,2=prec,3=p,4=a,5=b
+	\def\BorneInf{#4}\def\BorneSup{#5}
+	\ifthenelse{\equal{#4}{*}}%
+		{\def\BorneInf{1}}
+		{}
+	\ifthenelse{\equal{#5}{*}}%
+		{\def\BorneSup{\fpeval{trunc(1/#3*10,0)}}}
+		{}
+	\IfBooleanTF{#1}%
+	{%
+		\num[exponent-mode=scientific]{\xintFloatToDecimal{\xintfloateval{round(add((1-#3)^(i-1)*(#3), i=\BorneInf..\BorneSup),#2)}}}
+	}%
+	{%
+		\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add((1-#3)^(i-1)*(#3), i=\BorneInf..\BorneSup),#2)}}}
+	}
+}
+
+\NewDocumentCommand{\numPhypergeomP}{ s O{3} m m m m }{%*=sci,2=prec,3=N,4=n,5=m,6=k
+	\IfBooleanTF{#1}%
+	{%
+		\num[exponent-mode=scientific]{\xintFloatToDecimal{\xintfloateval{round(binomial(#5,#6)*binomial(#3-#5,#4-#6)/binomial(#3,#4),#2)}}}
+	}%
+	{%
+		\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(binomial(#5,#6)*binomial(#3-#5,#4-#6)/binomial(#3,#4),#2)}}}
+	}
+}
+
+\NewDocumentCommand{\numPhypergeomC}{ s O{3} m m m m m }{%*=sci,2=prec,3=N,4=n,5=m,6=a,7=b
+	\def\BorneInf{#6}\def\BorneSup{#7}
+	\ifthenelse{\equal{#6}{*}}%
+		{\def\BorneInf{0}}
+		{}
+	\ifthenelse{\equal{#7}{*}}%
+		{\def\BorneSup{#3}}
+		{}
+	\IfBooleanTF{#1}%
+	{%
+		\num[exponent-mode=scientific]{\xintFloatToDecimal{\xintfloateval{round(add(binomial(#5,i)*binomial(#3-#5,#4-i)/binomial(#3,#4), i=\BorneInf..\BorneSup),#2)}}}
+	}%
+	{%
+		\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add(binomial(#5,i)*binomial(#3-#5,#4-i)/binomial(#3,#4), i=\BorneInf..\BorneSup),#2)}}}
+	}
+}
+
 \NewDocumentCommand{\numPpoissP}{ s O{3} m m }{%*=sci,2=prec,3=lbda,4=k
 	\IfBooleanTF{#1}%
 	{%
@@ -2832,4 +2914,79 @@
 	\end{tikzpicture}
 }
 
+%==============SCHEMASPROBAS============= OK!
+%densites utiles
+\def\densnorm#1{1/(sqrt(2*pi))*exp(-0.5*(#1*#1))}
+\def\densexpo#1{exp(-#1)}
+
+\defKV[GRPHPROBCONTINUES]{%
+	CouleurAire=\def\GRPHPROBcoulsurf{#1},%
+	CouleurCourbe=\def\GRPHPROBcoulcbe{#1},%
+	Largeur=\def\GRPHPROBlarg{#1},%
+	Hauteur=\def\GRPHPROBhauteur{#1}
+}
+
+\setKVdefault[GRPHPROBCONTINUES]{%
+	CouleurAire=LightGray,%
+	CouleurCourbe=red,%
+	Largeur=2,%
+	Hauteur=1,%
+	AfficheM=true,%
+	AfficheCadre=true
+}
+
+\NewDocumentCommand\LoiNormaleGraphe{ O{} D<>{} m m m m }{%1=options,2=optionstikz,3=m,4=s,5=a,6=b
+	%simplekv
+	\useKVdefault[GRPHPROBCONTINUES]%
+	\setKV[GRPHPROBCONTINUES]{#1}%
+	%unites
+	\def\UNITEX{\fpeval{\GRPHPROBlarg/8}}\def\UNITEY{\fpeval{\GRPHPROBhauteur/0.5}}%
+	%bornes
+	\def\BorneInf{\fpeval{(#5-#3)/#4}}\def\BorneSup{\fpeval{(#6-#3)/#4}}%
+	\ifthenelse{\equal{#5}{*}}{\def\BorneInf{-4}}{}%
+	\ifthenelse{\equal{#6}{*}}{\def\BorneSup{4}}{}%
+	%tikzpicture
+	\begin{tikzpicture}[x=\UNITEX cm,y=\UNITEY cm,#2]
+		\ifboolKV[GRPHPROBCONTINUES]{AfficheM}%
+			{\draw (0,-0.0375) node[font=\tiny,scale={2*\UNITEX}] {#3} ;}
+			{}
+		\ifboolKV[GRPHPROBCONTINUES]{AfficheCadre}%
+			{\draw[Gray] (-4,-0.075) rectangle (4,0.425) ;}
+			{}
+		\clip (-4,-0.075) rectangle (4,0.425) ;
+		\draw[black,semithick,fill=\GRPHPROBcoulsurf] ({\BorneInf},0) -- plot [domain={\BorneInf}:{\BorneSup},samples=100] (\x,{\densnorm{\x}}) -- ({\BorneSup},0) -- cycle;
+		\draw[thick,->,>=stealth] (-4,0)--(4,0) ;
+		\draw[thick,densely dotted] (0,0)--(0,0.39894) ;
+		\draw[thick,domain=-4:4,samples=100,\GRPHPROBcoulcbe] plot (\x,{\densnorm{\x}}) ;
+	\end{tikzpicture}
+}
+
+\NewDocumentCommand\LoiExpoGraphe{ O{} D<>{} m m m }{%1=options,2=optionstikz,3=l,4=a,5=b
+	%simplekv
+	\useKVdefault[GRPHPROBCONTINUES]%
+	\setKV[GRPHPROBCONTINUES]{#1}%
+	%unites
+	\def\UNITEX{\fpeval{\GRPHPROBlarg/4}}\def\UNITEY{\fpeval{\GRPHPROBhauteur/1}}%
+	\def\MOYENNE{\fpeval{trunc(1/#3,0)}}%
+	%bornes
+	\def\BorneInf{\fpeval{#3*#4}}\def\BorneSup{\fpeval{#3*#5}}%
+	\ifthenelse{\equal{#4}{*}}{\def\BorneInf{0}}{}%
+	\ifthenelse{\equal{#5}{*}}{\def\BorneSup{4}}{}%
+	%tikzpicture
+	\begin{tikzpicture}[x=\UNITEX cm,y=\UNITEY cm,#2]
+		\ifboolKV[GRPHPROBCONTINUES]{AfficheCadre}%
+			{\draw[Gray] (-0.2,-0.15) rectangle (3.8,0.85) ;}
+			{}
+		\clip (-0.2,-0.15) rectangle (3.8,0.85) ;
+		\draw[black,semithick,fill=\GRPHPROBcoulsurf] ({\BorneInf},0) -- plot [domain={\BorneInf}:{\BorneSup},samples=100] (\x,{0.7*\densexpo{\x}}) -- ({\BorneSup},0) -- cycle;
+		\ifboolKV[GRPHPROBCONTINUES]{AfficheM}%
+			{\draw (1,-0.075) node[font=\tiny,scale={\UNITEX}] {\MOYENNE} ;
+			\draw[thick,densely dotted] (1,0)--(1,{0.7*\densexpo{1}}) ;}
+			{}
+		\draw[thick,->,>=stealth] (-0.2,0)--(3.8,0) ;
+		\draw[thick,->,>=stealth] (0,-0.15)--(0,0.85) ;
+		\draw[thick,domain=0:3.8,samples=100,\GRPHPROBcoulcbe] plot (\x,{0.7*\densexpo{\x}}) ;
+	\end{tikzpicture}
+}
+
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list.