Forum

Catégorie : Programmes
Forum : Les programmes des internautes
Vues : 2779
Réponses : 8
Type : discussion
Etat : réponses autorisées

LOIS : Le programme qui gère les différentes Lois .

PiErR le 05/05/2013 à 12:32
Bonjour à tous , je n'ai jamais posté mais je visite le forum régulèrement .
Je vous Présente Le programme LOIS , qui gére les lois Binomiale , normale et uniforme . Il Calcule aussi l'intégrale .
Il détaille les calculs ( sauf pour l'intégrale ) . De plus , il indique la séquence de touches à faire sur calculatrice .
Voici le programme :

http://www.uploadlux.com/l-086wesWHak

j'attends vos avis , optimisations . Merci et à bientôt .
pito2901 le 05/05/2013 à 13:33
Oui, bon voici le programme pour ceux qui sont fainéants qui ne veulent pas le télécharger:

Code

:FnOff
:AxesOff
:0→Xmin:0→Ymin:94→Xmax:62→Ymax
:ClrDraw
:Horizontal 60:Horizontal 59
:For(A,1,12
:   For(B,0,1
:      Text(4,17+5A+B,sub("Loi P/i/erre !",A,1
:   End:End
:Horizontal 50:Horizontal 51
:
:Horizontal 30:Horizontal 33
:Pt-On(0,32:Pt-On(94,32
:For(L,0,94,0.5
:   L/94*100→Z
:   iPart(Z)→Z
:   
:   Text(35,42,"",Z,"
:   
:   Pt-On(L,32
:   Pt-On(L,31
:End
:ClrDraw
:0→Xmin:0→Ymin:62→Ymax:94→Xmax
:Horizontal 60:Horizontal 59:Horizontal 50:Horizontal 51
:For(A,1,12
:   For(B,0,1
:      Text(4,17+5A+B,sub("Lo/i/ P/i/erre !",A,1
:   End:End
:‾10→Xmin:‾10→Ymin:10→Xmax:10→Ymax
:ClrDraw
:For(A,1,45
:   Text(A,15,"Loi  normale
:End
:For(B,1,35
:   Text(B,15,"Loi  uniforme
:End
:For(C,1,25
:   Text(C,15,"Loi  binomiale
:End
:For(D,1,18
:   Text(5,D+9,"       Et  Integrale
:   Text(12,73-D," De  f(x)
:End
:Pause :ClrDraw
:0→Xmin:0→Ymin:62→Ymax:94→Xmax
:Lbl Θ
:Menu("Calcul","Stats",1,"Loi Uniforme",2,"Calculer Z,X",3,"Lo/i/ Normale",4,"Integrale",5,"Loi Binomiale",6,">>> QUIT <<<",7
:Lbl 1
:&#8254;10&#8594;Xmin:&#8254;10&#8594;Ymin:10&#8594;Xmax:10&#8594;Ymax
:AxesOff
:ClrDraw:ClrHome
:"10 Rentres  n  et  p  et  cela  calculera  E(x) v(x) ainsi  que &#963;x
:DelVar CAns&#8594;Str0
:expr(sub(Ans,1,2&#8594;PV
:1&#8594;F
:sub(Str0,3,length(Str0)-2&#8594;Str0
:getKey
:Repeat C+F>length(Str0
:   PV+6&#8594;PV
:   C+F&#8594;F
:   Repeat Ans-F>25 or not(Ans
:      1+Ans&#8594;C
:      inString(Str0," ",Ans
:   End
:   C-F&#8594;C
:   If Ans>1
:   Then
:      sub(Str0,F,C
:      For(L,1,length(Ans
:         If dim(rand(int(.25(length(Ans)-L+4
:            Text(PV,1,sub(Ans,1,L)+sub("   _  ",1+3(sub(Ans,L,1)&#8800;" "),3
:         If getKey=91
:            Goto Q
:      End
:      Text(PV,1,sub(Str0,F,C)+"   
:   End
:End
:getKey
:0
:Repeat getKey
:   If dim(rand(15
:      not(Ans
:   Text(PV,1,sub(Str0,F,C)+sub("   _  ",1+3Ans,3
:   For(A,1,900
:   End
:   ClrDraw:ClrHome
:   Prompt N,P
:   ClrHome
:   N*P&#8594;E
:   E*(1-P)&#8594;V
:   &#8730;(V)&#8594;O
:   AxesOff
:   ClrDraw
:   62&#8594;Ymax:0&#8594;Xmin:0&#8594;Ymin:94&#8594;Xmax
:   Text(10,8,"=",N,"*",P," = ",E,"
:   Text(4,8,"E(X)=N*P
:   Text(22,8,"V(X) = E*(1-P)
:   Text(28,8,"=",E,"*(1-",P,") = ",V,"
:   Text(38,8,"&#963;x = &#8730;(V)"
:   Text(44,8,"=&#8730;(",V,") = ",O,"
:   Pause
:   Goto &#920;
:   Lbl 2
:   ClrDraw:ClrHome
:   Menu("Loi Uniforme","E(X)",Y,"A&#8804;X&#8804;B",S,"F(X)",U,"RETOUR",&#920;
:   Lbl Y
:   Prompt A,B
:   Text(10,2,"E(X)=A+B/2
:   Text(18,4,"=( ",A," + ",B," ) /2
:   (A+B)/2&#8594;E
:   Text(26,8,"E(X) = ",E,"
:   Pause :Goto 2
:   Lbl S
:   ClrHome:ClrDraw
:   Input "BORNE INF ",C
:   Input "BORNE SUP ",D
:   Prompt A,B
:   Text(10,2,"P(",A,"&#8804;X&#8804;",B,")=
:   B-A&#8594;F
:   D-C&#8594;G
:   Text(18,3,"(",B,"-",A,")/(",D,"-",C,")
:   Text(26,6,"",F,"/",G,"
:   (F/G)&#8594;H
:   Text(34,9,"= ",H,"
:   Pause :Goto 2
:   Lbl U
:   ClrDraw:ClrHome
:   Prompt A,B
:   Text(10,0,"f(X)=1/(B-A)
:   B-A&#8594;C
:   Text(20,5,"f(X)= 1/(",B,"-",A,")
:   Text(30,0,"f(X)= 1/",C,"
:   Pause
:   Goto 2
:   
:   Lbl 3
:   Menu("Calculer","Z",ZZ,"X",XX,"Retour",&#920;
:   Lbl ZZ
:   ClrHome:ClrDraw
:   Prompt E
:   Input "&#963;x = ",O
:   Prompt A,B
:   ClrDraw
:   Text(1,2,"-> P(",A,"&#8804; X &#8804; ",B,") ="
:   Text(9,2,"= ",A,"-",E," &#8804; X-",E," &#8804; ",B,"-",E,"
:   Text(16,2,"= ",N," &#8804; X-",E," &#8804; ",S,"
:   Text(23,2,"",N," &#8804; ((X-",E,") &#8804; ",S,"
:   Text(36,10,"",O,"            ",O,"                ",O,"
:   Text(44,2," ",U," &#8804; Z &#8804; ",V,"
:   Text(54,22,"(X-E)/&#963;x
:   Pause
:   Goto &#920;
:   Lbl XX
:   ClrDraw:ClrHome
:   Prompt Z,E
:   Input "&#963;x = ",O
:   Text(3,1,"Z=(X-E)/&#963;x
:   Text(16,1,"",Z,"=(X-",E,")/",O,"
:   O*Z&#8594;V
:   Text(26,1,"X-",E," = ",V,"
:   V+E&#8594;X
:   Text(36,1,"X = ",X,"
:   Pause
:   Goto 3
:   Lbl 4
:   Menu("loi normale","P(a&#8804;X&#8804;b)",PP,"P(X&#8804;x)=p",PI,"Retour",&#920;
:   Lbl PP
:   ClrHome:ClrDraw
:   Input "E(X) = ",E
:   Input "&#963;x = ",O
:   Input "BORNE INF = ",L
:   Input "BORNE SUP = ",R
:   normalcdf(L,R,E,O)&#8594;T
:   ClrDraw
:   Text(23,22,"LOI NORMALE :
:   Text(32,2,"normalcdf(",L,",",R,",",E,",",O,")
:   Text(38,22,"P(",L," &#8804; X &#8804; ",R,")
:   Text(44,2,"= ",T,"
:   Pause
:   Menu("Recommer ?","Oui",PP,"Non",4)
:   Lbl PI
:   ClrDraw:ClrHome
:   Prompt E
:   Input "&#963;x = ",O
:   Prompt P
:   invNorm(P,E,O)&#8594;X
:   Text(10,1,"P(X&#8804;x) = ",P,"
:   Text(20,1,"x = ",X,"
:   Text(30,1,"invNorm(",P,",",E,",",O,")
:   Pause
:   Goto 4
:   Lbl 5
:   ClrDraw:ClrHome
:   
:   ClrDraw
:   "10  Rentres  f(x) ainsi  que  les  bornes  inferieur  et  superieur
:   DelVar CAns&#8594;Str0
:   expr(sub(Ans,1,2&#8594;PV
:   1&#8594;F
:   sub(Str0,3,length(Str0)-2&#8594;Str0
:   getKey
:   Repeat C+F>length(Str0
:      PV+6&#8594;PV
:      C+F&#8594;F
:      Repeat Ans-F>25 or not(Ans
:         1+Ans&#8594;C
:         inString(Str0," ",Ans
:      End
:      C-F&#8594;C
:      If Ans>1
:      Then
:         sub(Str0,F,C
:         For(L,1,length(Ans
:            If dim(rand(int(.25(length(Ans)-L+4
:               Text(PV,1,sub(Ans,1,L)+sub("   _  ",1+3(sub(Ans,L,1)&#8800;" "),3
:            If getKey=91
:               Goto Q
:         End
:         Text(PV,1,sub(Str0,F,C)+"   
:      End
:   End
:   getKey
:   0
:   Repeat getKey
:      If dim(rand(15
:         not(Ans
:      Text(PV,1,sub(Str0,F,C)+sub("   _  ",1+3Ans,3
:      For(A,1,900
:      End
:      Pause :ClrDraw
:      &#8254;10&#8594;Xmin:&#8254;10&#8594;Ymin:10&#8594;Xmax:10&#8594;Ymax
:      Horiz
:      Horizontal 10:Vertical &#8254;10:Vertical 10
:      Line(&#8254;7.4,6,&#8254;7.44,&#8254;4
:      Line(&#8254;6.8,6,&#8254;7.2,6.6
:      Line(&#8254;8,&#8254;4,&#8254;7.7,&#8254;4.7
:      Text(2,17,"b
:      Text(18,17,"a
:      Disp "
:      Input "f(X) = ",Str1
:      Text(10,21,Str1+" dx
:      ClrHome
:      Input "BORNE INF = ",A
:      Text(18,17,"",A,"
:      ClrHome
:      Input "BORNE SUP = ",B
:      Text(2,17,"",B,"
:      Pause
:      ClrHome
:      Str1&#8594;Y1
:      FnOff
:      fnInt(Y1,X,A,B)&#8594;H
:      Text(1,0,"f(X)= ",Str1,"
:      Text(10,0,"fnInt(",Str1,",X,",A,",",B,")
:      Text(20,6,"F(",B,") - F(",A,") = ",H,"
:      Pause
:      ClrHome
:      Disp "     VALEUR "
:      Disp "    ABSOLUE "
:      Disp H&#9658;Frac
:      Pause
:      Full
:      0&#8594;Xmin:0&#8594;Ymin:94&#8594;Xmax:62Ymax
:      Goto &#920;
:      Lbl 6
:      ClrHome
:      Prompt N,P
:      Lbl P
:      Menu("Binomiale","B(N,P)",R,"=K",A,"&#8804;K",C,"&#8805;1",D,"A&#8804;X&#8804;B",E,"    ->",J,"Retour",&#920;
:      Lbl A
:      ClrHome
:      Prompt X
:      binompdf(N,P,X)&#8594;K
:      ClrDraw
:      Text(10,3,"P(X=",X,") = ",K,"
:      
:      Text(25,0,"P(X=",X,")=(",X,")*",P," *(1-",P,")
:      Text(20,27,"",N,"
:      Text(20,54,"",X,"
:      N-X&#8594;S
:      Text(20,87,"",S,"
:      Text(0,3,"binompdf(",N,",",P,",",X,")
:      Text(40,29,"N
:      Text(40,43,"K
:      Text(40,66,"N-K
:      Text(46,0,"P(X=K)=(K)*P *(1-P)
:      Pause
:      Goto P
:      Lbl R
:      ClrHome:ClrDraw
:      Text(0,0,"c\\\'est une repetition de
:      Text(6,10,"",N," epreuves
:      Text(12,0,"Identiques Et Indepandantes ,
:      Text(18,0," Dont la proba du succes
:      Text(24,5,"Est egale a ",P,"
:      Text(30,4,"Donc X Suit la loi
:      Text(36,3,"binomiale de parametres
:      Text(42,0,"n= ",N,"   Et    p= ",P,"
:      Text(48,0,"B(",N,",",P,")
:      Pause
:      Goto P
:      Lbl D
:      1-binompdf(N,P,0)&#8594;T
:      ClrDraw
:      Text(4,86,"N"
:      Text(10,0,"P(X&#8805;1)=1-P(X=0)=1-(1-P)
:      Text(20,0,"P(X&#8805;1)=1-(1-",P,")^",N,"
:      1-P&#8594;G
:      Text(30,0,"P(X&#8805;1)=1-",G,"^",N,"
:      Text(40,0,"P(X&#8805;1)=",T,"
:      Text(50,10,"1-binompdf(",N,",",P,",0)
:      Pause
:      Goto P
:      Lbl C
:      ClrHome
:      Prompt K
:      binomcdf(N,P,K)&#8594;Y
:      ClrDraw
:      Text(10,0,"P(X&#8804;",K,")=",Y,"
:      Text(20,0,"binomcdf(",N,",",P,",",K,")
:      Pause
:      Goto P
:      Lbl E
:      ClrHome:ClrDraw
:      Prompt A,B
:      A-1&#8594;V
:      binomcdf(N,P,B)-binomcdf(N,P,(A-1))&#8594;Z
:      Text(10,0,"P(",A," &#8804; X &#8804; ",B,")
:      Text(18,0,"P(X&#8804;",B,")-P(X&#8804;",V,")
:      Text(30,2,"binomcdf(",N,",",P,",",B,")
:      Text(38,0,"-binomcdf(",N,",",P,",",V,")
:      Text(50,10,"= ",Z,"
:      Pause
:      Goto P
:      Lbl F
:      ClrDraw:ClrHome
:      Prompt A,B
:      B-1&#8594;W
:      Text(10,0,"P(",A,"<X<",B,")=
:      Text(20,12,"= P(X&#8804;",W,")-P(X&#8804;",A,")
:      binomcdf(N,P,W)-binomcdf(N,P,A)&#8594;Z
:      Text(30,0,"binomcdf(",N,",",P,",",W,")
:      Text(38,0,"-binomcdf(",N,",",P,",",A,")
:      Text(48,12,"=",Z,"
:      Pause :Goto P
:      Lbl G
:      ClrDraw:ClrHome
:      Prompt K
:      K-1&#8594;R
:      Text(10,0,"P(",K,">X)="
:      Text(18,12,"P(X<",K,")=P(X&#8804;",R,")
:      Text(26,10,"binomcdf(",N,",",P,",",R,")
:      binomcdf(N,P,R)&#8594;Z
:      Text(36,18,"=",Z,"
:      Pause :Goto P
:      Lbl J
:      Menu("SUITE","X>K",G,"X&#8805;K",H,"X<K",I,"A<X<B",F,"listes",LI,"RETOUR",P)
:      Lbl H
:      ClrDraw:ClrHome
:      Prompt K
:      K-1&#8594;Q
:      Text(10,0,"P(X&#8805;",K,") =
:      Text(24,10,"1-P(X&#8804;",Q,")
:      Text(30,6,"1-binomcdf(",N,",",P,",",Q,")
:      1-binomcdf(N,P,Q)&#8594;S
:      Text(38,18,"= ",S,"
:      Pause :Goto P
:      Lbl I
:      ClrDraw:ClrHome
:      Prompt K
:      K-1&#8594;Q
:      Text(10,0,"P(X<",K,")=
:      Text(18,10,"P(X&#8804;",Q,")
:      Text(26,10,"= binomcdf(",N,",",P,",",Q,")
:      binomcdf(N,P,Q)&#8594;Z
:      Text(36,20,"= ",Z,"
:      Pause :Goto P
:      Lbl LI
:      ClrDraw:ClrHome:ClrAllLists
:      seq(X,X,0,N,1)&#8594;L1
:      binompdf(N,P)&#8594;L2
:      binomcdf(N,P)&#8594;L3
:      Text(10,6,"L<sub>1</sub> se trouve
:      Text(17,1,"Les &#8800; Valeurs de N
:      Text(27,1,"L<sub>2</sub> Se situe proba P(X=X)
:      Text(37,1,"L<sub>3</sub> Se situe proba P(X&#8804;X)
:      
:      Pause
:      Goto P
:      Lbl 7
:      FnOn
:      AxesOn:ZStandard


Malheureusement je n'ai pas les compétences pour l'optimiser, mais il y a sûrement des améliorations à faire. cupsmiley.gif
florian93500 le 19/06/2013 à 12:31
connar fils de pute
m@thieu41 le 19/06/2013 à 13:23
Si le webmaster (si quelqu'un arrive à le contacter) ou un modaux pourrait supprimer le post ci-dessus ça serait cool crazy.gif
blg_flg le 19/06/2013 à 18:49
Et oui, maintenant, c'est que ça se passe, aussi...
m@thieu41 le 19/06/2013 à 20:17
Ouais enfin... Tappe "ti 82 stats" sur google, le premier forum que tu trouveras se sera celui-ci, pas le nouveau...
Donc les nouveaux non averti continueront de venir ici...
Et puis de toute façon c'est absolument pas une raison pour poster des messages comme ça crazy.gif
linkakro le 19/06/2013 à 20:46
Persalteas était le dernier modérateur et il est ocupé et il a décidé de créer un nouveau forum.
Le Webmaster est tout simplement dans la vraie vie maintenant.
Les deux se contactent facilement avec la fonctionnalité mail du forum. Tu les cherches dans la liste des membres et tu envoies le message.
Etant donné les défauts réguliers, en particulier les trolls, ce n'est pas raisonnable de leur envoyer un mail à chaque fois.

Ce sujet m'intéresse mais je n'ai pas le temps de décortiquer tout le programme.
Theodu59 le 30/09/2014 à 20:00
Salut , le programme ne marche pas ( j'ai recopié à la main ). Quelqu'un sait-il pourquoi ?
Merci.
linkakro le 30/09/2014 à 21:09
Qu'est ce qui ne marche pas ? Message d'erreur ou mauvais résultat ? Si c'est un message d'erreur quel est le type (titre du menu d'erreur) et l'emplacement signalé par le curseur de la calculatrice (choix goto/voir dans le menu) ?
Si jamais l'erreur venait de toi je ne trouverai pas en le copiant moi-même. Donc commence par décrire ton problème et je pourrais chercher en conséquence.

Les espaces en début de ligne ne doivent pas être recopiés car ils servent uniquement la lisibilité sur le forum.

Les codes &#numero; sont des codes html de caractères unicodes que le forum ne supporte pas. Mon article sur les caractères du forum le traite. Colle les dans google valide et google relira le tout en unicode compréhensible. N'importe quel champ de texte fait l'affaire, il faut juste que ce soit stocké et restitué d'une façon ou d'une autre.