{"id":10252,"date":"2025-09-22T07:59:03","date_gmt":"2025-09-22T05:59:03","guid":{"rendered":"https:\/\/spgoo.org\/?page_id=10252"},"modified":"2025-09-22T07:59:04","modified_gmt":"2025-09-22T05:59:04","slug":"paradoxe-dallais","status":"publish","type":"page","link":"https:\/\/spgoo.org\/?page_id=10252","title":{"rendered":"Paradoxe d&#8217;Allais"},"content":{"rendered":"<link rel=\"stylesheet\" href=\"https:\/\/cdn.jsdelivr.net\/npm\/jsxgraph\/distrib\/jsxgraph.css\">\r\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/jsxgraph@1.11.1\/distrib\/jsxgraphcore.js\"><\/script>\r\n<!-- MathJax -->\r\n<script>\r\n    window.MathJax = {\r\n      tex: { inlineMath: [['\\\\(', '\\\\)'], ['$', '$']] },\r\n      svg: { fontCache: 'global' }\r\n    };\r\n<\/script>\r\n<script async src=\"https:\/\/cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-chtml.js\" id=\"MathJax-script\"><\/script>\r\n\r\n<style>\r\n    .board-container {\r\n      display: flex;\r\n      gap: 20px; \/* space between boards *\/\r\n      margin: 20px;\r\n    }\r\n    .jxgbox {\r\n      width: 500px;\r\n      height: 500px;\r\n      border: 1px solid #ccc;\r\n    }\r\n  <\/style>\r\n  <div class=\"board-container\">\r\n    <div id=\"box1\" class=\"jxgbox\"><\/div>\r\n    <div id=\"box2\" class=\"jxgbox\"><\/div>\r\n  <\/div>\r\n\t<span style=\"color:white;\">$\\textrm{Si vos deux choix sont du m\u00eame c\u00f4t\u00e9 des courbes d&#8217;indiff\u00e9rences, vos pr\u00e9f\u00e9rences sont compatibles avec la th\u00e9orie de von Neumann &#038; Morgenstern.}$<\/span>\r\n\r\n  <script>\r\n\t  JXG.Options.text.useMathJax = true;\r\n\t  const board1 = JXG.JSXGraph.initBoard('box1', {\r\n\t\t  boundingbox: [-.25, 1.2, 1.2, -.25],\r\n\t\t  axis:false,showinfobox:false,showcopyright:false,shownavigation:false\r\n\t  });\r\n\t  board1.renderer.container.style.backgroundColor = 'gainsboro';\r\n \r\n\t  const board2 = JXG.JSXGraph.initBoard('box2', {\r\n\t\t  boundingbox: [-5, 5, 5, -5],\r\n\t\t  axis: false,showinfobox:false,showcopyright:false,shownavigation:false});\r\n\t  board2.renderer.container.style.backgroundColor = 'gainsboro';\r\n\r\n\t  \/\/board1 est l'enfant du board 2 (si le board 1 est mis \u00e0 jour, le nboard 2 l'est aussi)\r\n\t  board2.addChild(board1)\r\n\r\n\t  const b1p0 = board1.create('point', [0, 0], {fixed:true,name: '0', size: 4,visible:false});\r\n\t  const b1p1 = board1.create('point', [0, 1], {fixed:true,name: '1', size: 4,visible:false});\r\n\t  const b1p2 = board1.create('point', [1,0], {fixed:true,name: '1', size: 4,visible:false});\r\n\t  const b1pol0 = board1.create('polygon', [b1p0,b1p1,b1p2], \r\n\t\t{name: '',fixed:true, highlight:false,strokeColor:\"#818589\",strokeWidth:2,fillColor:\"#818589\",borders: {\r\n\t\thighlight: false,strockeColor:'marineblue',strokeWidth:2}});\r\n\r\n\t  const b1text0 = board1.create('text', [0.5,-0.08, '\\\\(p_1\\\\)'], {fixed:true,name: '', size: 4,visible:true});\t\r\n\t  const b1text1 = board1.create('text', [-0.2,0.5, '\\\\(p_2\\\\)'], {fixed:true,name: '', size: 4,visible:true});\t\r\n\r\n\t  \/\/loteries 0\r\n\t  const b1l0 = board1.create('point', [0, 1], {name: '', size: 4,fixed:true,color:'LightSalmon',highlight:false,});\r\n\t  const itb1l0 = board1.create('text', [0.1, 1.05, '\\\\(l_1 = [0,1,0]\\\\)'], {visible: false, anchorX: 'left', anchorY: 'top'  });\r\n\t  \/\/ \u00c9v\u00e9nement : survol\r\n\t  b1l0.on('over', () => {itb1l0.setAttribute({visible: true});board1.update();});\r\n\r\n\t  \/\/ \u00c9v\u00e9nement : sortie de la souris\r\n\t  b1l0.on('out', () => {itb1l0.setAttribute({visible: false});board1.update();});\r\n\t  \/\/loteries 1 \r\n\t  const b1l1 =  board1.create('point', [0.1, 0.89], {name: '', size: 4,fixed:true,color:'LightSalmon',highlight:false});\r\n\t  const itb1l1 = board1.create('text', [.4, 0.95, '\\\\(l_2 = [0.1,0.88,0.01]\\\\)'], {visible: false, anchorX: 'middle', anchorY: 'top'  });\r\n\t  \/\/ \u00c9v\u00e9nement : survol\r\n\t  b1l1.on('over', () => {itb1l1.setAttribute({visible: true});board1.update();});\r\n\r\n\t  \/\/ \u00c9v\u00e9nement : sortie de la souris\r\n\t  b1l1.on('out', () => {itb1l1.setAttribute({visible: false});board1.update();});\r\n\t  \/\/loteries 2\r\n\t  const b1l2 =    board1.create('point', [0.89, 0.11], {name: '', size: 4,fixed:true,color:'Lightblue',highlight:false});\r\n\t  const itb1l2 = board1.create('text', [0.98, 0.2, '\\\\(l_3 = [0.89,0.11,0]\\\\)'], {visible: false, anchorX: 'middle', anchorY: 'top'  });\r\n\t  \/\/ \u00c9v\u00e9nement : survol\r\n\t  b1l2.on('over', () => {itb1l2.setAttribute({visible: true});board1.update();});\r\n\r\n\t  \/\/ \u00c9v\u00e9nement : sortie de la souris\r\n\t  b1l2.on('out', () => {itb1l2.setAttribute({visible: false});board1.update();});\r\n\r\n\t\/\/loteries 3\r\n\tconst b1l3 =    board1.create('point', [0.90, 0], {name: '', size: 4,fixed:true,color:'Lightblue',highlight:false});\r\n\tconst itb1l3 = board1.create('text', [0.97, -0.1, '\\\\(l_4 = [0.9,0,0.1]\\\\)'], {visible: false, anchorX: 'middle', anchorY: 'top'  });\r\n\t\/\/ \u00c9v\u00e9nement : survol\r\n\tb1l3.on('over', () => {itb1l3.setAttribute({visible: true});board1.update();});\r\n\r\n\t\/\/ \u00c9v\u00e9nement : sortie de la souris\r\n\tb1l3.on('out', () => {itb1l3.setAttribute({visible: false});board1.update();});\r\n\r\n\tconst checkbox = board1.create('checkbox', [-0.15, -0.15, ''], {snapToGrid: false,anchorX: 'middle', anchorY: 'middle' });\r\n\r\n\t\/\/Niveaux d'esp\u00e9rance d'utilit\u00e9\r\n\tconst A1 = board1.create('point', [0, 1.01],{visible:false});\r\n\tconst B1 = board1.create('point', [0.7, -0.1],{visible:false});\r\n\tconst seg1 = board1.create('segment', [A1, B1], {strokeColor: 'green',dash:0,highlight:false,visible:false});\r\n\tconst A2 = board1.create('point', [-0.3, 1.15],{visible:false});\r\n\tconst B2 = board1.create('point', [0.4, -0.1],{visible:false});\r\n\tconst seg2 = board1.create('segment', [A2, B2], {strokeColor: 'green',dash:0,highlight:false,visible:false});\r\n\tconst A3 = board1.create('point', [0.25, 1.01],{visible:false});\r\n\tconst B3 = board1.create('point', [1, -0.1],{visible:false});\r\n\tconst seg3 = board1.create('segment', [A3, B3], {strokeColor: 'green',dash:0,highlight:false,visible:false});\r\n\tconst a = board1.create('point', [0, 0],{visible:false});\r\n\tconst b = board1.create('point', [0, 1],{visible:false});\r\n\tconst c = board1.create('point', [1, 0],{visible:false});\r\n\tconst line1 = board1.create('line', [a, c], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst line2 = board1.create('line', [b, c], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst line3 = board1.create('line', [a, b], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst inter00 = board1.create('intersection', [line1, seg1], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst inter01 = board1.create('intersection', [line2, seg1], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst seg11 = board1.create('segment', [inter00, inter01], {strokeColor: 'green',dash:2,highlight:false,visible:() => checkbox.Value()});\/\/***\r\n\tconst inter20 = board1.create('intersection', [line3, seg2], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst inter21 = board1.create('intersection', [line1, seg2], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst seg21 = board1.create('segment', [inter20, inter21], {strokeColor: 'green',dash:2,highlight:false,visible:() => checkbox.Value()});\/\/***\r\n\r\n\tconst inter30 = board1.create('intersection', [line1, seg3], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst inter31 = board1.create('intersection', [line2, seg3], {strokeColor: 'green',highlight:false,fixed:true,visible:false});\r\n\tconst seg31 = board1.create('segment', [inter30, inter31], {strokeColor: 'green',dash:2,highlight:false,visible:() => checkbox.Value()});\/\/***\r\n\t  \r\nlet tab_pts={\"loterie1\":[b1l0,b1l1],\"loterie2\":[b1l2,b1l3]};\t  \r\nlet valider={\"loterie1\":[],\"loterie2\":[]};\r\n\t  \r\n\/\/board2\r\n\/\/ exemple : loterie([-4,1],[-4,4],[-1,4],(-1,1))\r\nconst loterie=function(a,b,c,d,pourcentages,coul, nom,loterie,pt) {\r\n  const l11 = board2.create('point',a,{visible:false});\r\n  const l12 = board2.create('point',b,{visible:false});\r\n  const l13 = board2.create('point',c,{visible:false});\r\n  const l14 = board2.create('point',d,{visible:false});\r\n  const poly1 = board2.create('polygon',[l11,l12,l13,l14],\r\n\t\t{hasInnerPoints:true,highlight:false,color:coul,shadow:true,borders: {highlight: false,strokeColor: 'transparent'}});\r\n  const l1d = board2.create('point',[a[0]+0.5,a[1]+1.5],{name:'',size:7,visible:true,label:{autoPosition: true, offset:[-2, 2]},shadow:true});\r\n  const nl1 = board2.create('text',[a[0]+0.5,a[1]+1.5,'\\\\('+nom+'\\\\)'],{fixed:true,anchorX:'middle',anchorY:'middle'});\r\n  const l1a = board2.create('point',[c[0]-1,b[1]-0.5],{visible:false});\r\n  const l1b = board2.create('point',[c[0]-1,b[1]-1.5],{visible:false});\r\n  const l1c = board2.create('point',[c[0]-1,b[1]-2.5],{visible:false});\r\n  const line11 = board2.create('segment',[l1d,l1a],{highlight:false,visible:true,fixed:true});\r\n  const line12 = board2.create('segment',[l1d,l1b],{highlight:false,visible:true,fixed:true});\r\n  const line13 = board2.create('segment',[l1d,l1c],{highlight:false,visible:true,fixed:true});\r\n  const lots11 = board2.create('text',[a[0]+2.5,b[1]-0.5,'\\\\(0 \\\\,\\\\)\u20ac'],{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  const lots12 = board2.create('text',[a[0]+2.5,b[1]-1.5,'\\\\(100 \\\\overline{M} \\\\,\\\\)\u20ac'],\r\n\t\t{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  const lots13 = board2.create('text',[a[0]+2.5,b[1]-2.5,'\\\\(500 \\\\overline{M} \\\\,\\\\)\u20ac'],\r\n\t\t{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  const prob11 = board2.create('text',[a[0]+1.3,b[1]-0.8,'\\\\('+pourcentages[0]+'\\\\)'],{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  const prob12 = board2.create('text',[a[0]+1.3,b[1]-1.4,'\\\\('+pourcentages[1]+'\\\\)'],{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  const prob13 = board2.create('text',[a[0]+1.3,b[1]-2.3,'\\\\('+pourcentages[2]+'\\\\)'],{highlight:false,visible:true,anchorX:'middle',anchorY:'middle',fixed:true});\r\n  poly1.couleur=coul\r\n  valider[loterie].push(poly1);\r\n\t\r\n  poly1.on(\"over\",function() {\r\n\tif (this.active==undefined )\r\n    \tthis.setAttribute({\"color\":\"yellow\"});\r\n    if (!this.visProp.fixed) {\r\n          board2.containerObj.style.cursor = 'pointer';\r\n    }\r\n  });\r\n  poly1.on(\"out\",function() {\r\n    if (this.active==undefined )\r\n\t\tthis.setAttribute({\"color\":this.couleur});\r\n    if (!this.visProp.fixed) {\r\n          board2.containerObj.style.cursor = 'default';\r\n    }\r\n  });\r\n  poly1.on(\"up\",function() {\r\n\t\/\/ on el\u00e8ve tout \r\n\tvalider[loterie].forEach(lot=>{\r\n\t\tlot.setAttribute({\"color\":this.couleur});\r\n\t\tlot.active=false;\r\n\t})\r\n\ttab_pts[loterie].forEach(pt=>pt.setAttribute({color:coul}));\r\n\tthis.setAttribute({\"color\":\"blue\"});\r\n\tthis.active=true;\r\n\tpt.setAttribute({color:'#AE181E '});\r\n  });\r\n}\r\n\r\n\/\/ construction loteries : l1\r\nloterie([-4,1],[-4,4],[-1,4],[-1,1],[0,1,0],\"lightblue\",\"l_1\",\"loterie1\",b1l0);\r\nloterie([1,1],[1,4],[4,4],[4,1],[0.01,0.89,0.1],\"lightblue\",\"l_2\",\"loterie1\",b1l1);\r\nloterie([-4,-4],[-4,-1],[-1,-1],[-1,-4],[0.89,0.11,0],\"LightSalmon\",\"l_3\",\"loterie2\",b1l2);\r\nloterie([1,-4],[1,-1],[4,-1],[4,-4],[0.90,0,0.1],\"LightSalmon\",\"l_4\",\"loterie2\",b1l3);\r\n\r\nconst q1 = board2.create('point',[-5.5,0],{visible:false});\r\nconst q2 = board2.create('point',[5.5,0],{visible:false});\r\nconst separatrix = board2.create('line',[q1,q2],{size:2,strokeColor:'#AE181E',shadow:true});\r\n\r\nconst text0 = board2.create('text',[0,4.5,'\\\\(\\\\textrm{Choisissez une loterie parmi les deux loteries bleues (cliquez)}\\\\)'],{fixed:true,anchorX:'middle',anchorY:'middle',size:2,strokeColor:'#AE181E',shadow:true});\r\nconst text1 = board2.create('text',[0,-.5,'\\\\(\\\\textrm{Choisissez une loterie parmi les deux loteries saumons  (cliquez)}\\\\)'],{fixed:true,anchorX:'middle',anchorY:'middle',size:2,strokeColor:'#AE181E',shadow:true});\r\n\r\nconst cbInput = checkbox.rendNodeCheckbox || checkbox.rendNode; \/\/ input HTML\r\n    JXG.addEvent(cbInput, 'change', () => {\r\n      \/\/ (pas n\u00e9cessaire si on utilise visible: () => checkbox.Value(), mais utile si tu fais du setAttribute)\r\n      \/\/ seg.setAttribute({ visible: checkbox.Value() });\r\n      board1.update(); \/\/ Recalcule et rafra\u00eechit\r\n    }, checkbox);\r\nconst pa0 = board1.create('text',[0.2,1.1,\"\\\\( \\\\textrm{Test du Paradoxe d'Allais}\\\\)\"],{fixed:true,fontsize:16,color:\"#AE181E\"});\r\nconst eu0 = board1.create('text',[-0.1,-.148,\"\\\\( \\\\longleftarrow \\\\overline{\\\\mathbb{E}U}\\\\)\"],{fixed:true, visible:true});\r\n\r\n\t  \r\nconst reset=function() {\r\n\tvalider[\"loterie1\"].forEach(lot=>{\r\n\t\tlot.setAttribute({\"color\":lot.couleur});\r\n\t\tlot.active=false;\r\n\t})\r\n\tvalider[\"loterie2\"].forEach(lot=>{\r\n\t\tlot.setAttribute({\"color\":lot.couleur});\r\n\t\tlot.active=false;\r\n\t})\r\n\tb1l0.setAttribute({color:'LightSalmon '});\r\n\tb1l1.setAttribute({color:'LightSalmon'});\r\n\tb1l2.setAttribute({color:'lightblue'});\r\n\tb1l3.setAttribute({color:'lightblue '});\r\n\t\r\n}\r\n\/\/ il faut ajouter un bouton reset pour recommencer \r\nboard1.create(\"button\",[0.8,-0.18,\"$Reset$\",function() {reset();}],{});\r\nMathJax.typesetPromise();\r\n\t  \t  \r\n  <\/script>\r\n\r\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-10252","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/pages\/10252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spgoo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10252"}],"version-history":[{"count":1,"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/pages\/10252\/revisions"}],"predecessor-version":[{"id":10253,"href":"https:\/\/spgoo.org\/index.php?rest_route=\/wp\/v2\/pages\/10252\/revisions\/10253"}],"wp:attachment":[{"href":"https:\/\/spgoo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}