-
Notifications
You must be signed in to change notification settings - Fork 10
/
DavidMackay.nb
6132 lines (5868 loc) · 250 KB
/
DavidMackay.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 0, 0]
NotebookDataLength[ 256323, 6131]
NotebookOptionsPosition[ 245822, 5780]
NotebookOutlinePosition[ 246178, 5796]
CellTagsIndexPosition[ 246135, 5793]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Manipulate", "[",
RowBox[{
RowBox[{"DiscretePlot", "[",
RowBox[{
FractionBox[
RowBox[{
RowBox[{"Fa", "!"}],
RowBox[{"Fb", "!"}]}],
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"Fa", "+", "Fb", "+", "1"}], ")"}], "!"}],
SuperscriptBox["p0", "Fa"],
SuperscriptBox[
RowBox[{"(",
RowBox[{"1", "-", "p0"}], ")"}], "Fb"]}]], ",",
RowBox[{"{",
RowBox[{"Fa", ",", "1", ",", "20"}], "}"}]}], "]"}], ",", " ",
RowBox[{"{",
RowBox[{"p0", ",", "0.1", ",", "1"}], "}"}], ",",
RowBox[{"{",
RowBox[{"Fb", ",", "1", ",", "20"}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.699328237434643*^9, 3.699328393322839*^9}, {
3.699328424149378*^9, 3.6993284793683243`*^9}, {3.699328528341357*^9,
3.6993285602462807`*^9}}],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`Fb$$ = 1, $CellContext`p0$$ = 0.1,
Typeset`show$$ = True, Typeset`bookmarkList$$ = {},
Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ =
1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`p0$$], 0.1, 1}, {
Hold[$CellContext`Fb$$], 1, 20}}, Typeset`size$$ = {360., {106., 110.}},
Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ =
True, $CellContext`p0$3697$$ = 0, $CellContext`Fb$3698$$ = 0},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm,
"Variables" :> {$CellContext`Fb$$ = 1, $CellContext`p0$$ = 0.1},
"ControllerVariables" :> {
Hold[$CellContext`p0$$, $CellContext`p0$3697$$, 0],
Hold[$CellContext`Fb$$, $CellContext`Fb$3698$$, 0]},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$}, "Body" :>
DiscretePlot[
Factorial[$CellContext`Fa] (
Factorial[$CellContext`Fb$$]/((
Factorial[$CellContext`Fa + $CellContext`Fb$$ +
1] $CellContext`p0$$^$CellContext`Fa) (
1 - $CellContext`p0$$)^$CellContext`Fb$$)), {$CellContext`Fa, 1,
20}], "Specifications" :> {{$CellContext`p0$$, 0.1,
1}, {$CellContext`Fb$$, 1, 20}}, "Options" :> {},
"DefaultOptions" :> {}],
ImageSizeCache->{405., {164., 169.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Manipulate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{
3.699328395729369*^9, {3.699328427918469*^9, 3.6993284798455763`*^9}, {
3.69932853096961*^9, 3.699328560624818*^9}}]
}, Open ]],
Cell[BoxData["Manipulate"], "Input",
CellChangeTimes->{{3.69932830588168*^9, 3.699328310039027*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"3", "!"}]], "Input",
CellChangeTimes->{{3.6993284920827417`*^9, 3.699328493065323*^9}}],
Cell[BoxData["6"], "Output",
CellChangeTimes->{3.69932849356371*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"BaseForm", "[",
RowBox[{"6", ",", "2"}], "]"}]], "Input",
NumberMarks->False],
Cell[BoxData[
TagBox[
InterpretationBox[
SubscriptBox["\<\"110\"\>", "\<\"2\"\>"],
6,
Editable->False],
BaseForm[#, 2]& ]], "Output",
CellChangeTimes->{3.6993472759934607`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"a", "=",
RowBox[{"RandomInteger", "[",
RowBox[{"{",
RowBox[{"1", ",", "200"}], "}"}], "]"}]}]], "Input",
CellChangeTimes->{{3.699329076625682*^9, 3.699329079457664*^9}}],
Cell[BoxData["132"], "Output",
CellChangeTimes->{3.699329079916307*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"n", "=", "50"}], ";",
RowBox[{"p", "=",
RowBox[{"1", "/", "2"}]}], ";",
RowBox[{"L", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"Log", "[",
FractionBox[
RowBox[{
RowBox[{"a", "!"}],
RowBox[{
RowBox[{"(",
RowBox[{"n", "-", "a"}], ")"}], "!"}]}],
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"n", "+", "1"}], ")"}], "!"}],
SuperscriptBox[
RowBox[{"(", "p", ")"}], "a"],
SuperscriptBox[
RowBox[{"(",
RowBox[{"1", "-", "p"}], ")"}],
RowBox[{"n", "-", "a"}]]}]], "]"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "50"}], "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.6993288542483053`*^9, 3.699328901057145*^9}, {
3.699328949933235*^9, 3.69932917060741*^9}, {3.699329245620038*^9,
3.6993292466673737`*^9}, {3.699329300296432*^9, 3.699329327948861*^9}, {
3.69932941850278*^9, 3.6993294273921833`*^9}, {3.699329512602008*^9,
3.6993295128304*^9}, {3.699329727108099*^9, 3.6993299304181633`*^9}, {
3.6993300171966457`*^9, 3.6993300338839808`*^9}, {3.699330094333941*^9,
3.699330111344844*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Mean", "[", "L", "]"}], "//", "N"}]], "Input",
CellChangeTimes->{{3.6993298033114557`*^9, 3.699329814331156*^9}}],
Cell[BoxData[
RowBox[{"-", "1.7450231105390526`"}]], "Output",
CellChangeTimes->{{3.699329809933749*^9, 3.699329831341694*^9}, {
3.699329875216983*^9, 3.699329933396935*^9}, {3.699330022838773*^9,
3.699330037431375*^9}}]
}, Open ]],
Cell[BoxData["a"], "Input",
CellChangeTimes->{{3.699329691352376*^9, 3.699329703623824*^9}}],
Cell[BoxData[
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{"RandomInteger", "[",
RowBox[{"{",
RowBox[{"0", ",", "200"}], "}"}], "]"}], "!"}],
RowBox[{
RowBox[{"(",
RowBox[{"1", "-",
RowBox[{"RandomInteger", "[",
RowBox[{"{",
RowBox[{"0", ",", "200"}], "}"}], "]"}]}], ")"}], "!"}]}]}]], "Input",\
CellChangeTimes->{{3.699328781957443*^9, 3.699328843325108*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"RandomInteger", "[",
RowBox[{"{",
RowBox[{"0", ",", "200"}], "}"}], "]"}]], "Input",
CellChangeTimes->{{3.6993285088336782`*^9, 3.69932850985773*^9}, {
3.699328677393478*^9, 3.6993286857192507`*^9}, {3.6993287259451017`*^9,
3.6993287807942553`*^9}}],
Cell[BoxData["172"], "Output",
CellChangeTimes->{{3.699328728713378*^9, 3.69932875865475*^9}}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"Fb", "=", "100"}], ";",
RowBox[{"p0", "=",
RowBox[{"1", "/", "6"}]}], ";",
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"Log", "[",
FractionBox[
RowBox[{
RowBox[{"Fa", "!"}],
RowBox[{"Fb", "!"}]}],
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"Fa", "+", "Fb", "+", "1"}], ")"}], "!"}],
SuperscriptBox["p0", "Fa"],
SuperscriptBox[
RowBox[{"(",
RowBox[{"1", "-", "p0"}], ")"}], "Fb"]}]], "]"}], ",",
RowBox[{"{",
RowBox[{"Fa", ",", "0", ",", "200"}], "}"}]}], "]"}]}]], "Input",
CellChangeTimes->{{3.699328583496714*^9, 3.6993286520042477`*^9}}],
Cell[BoxData[
GraphicsBox[{{}, {},
{RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], Opacity[
1.], LineBox[CompressedData["
1:eJwVlHk01P/3x2fmTclSZEmRrJFsY2bsmmsJFVmyZ48xtqyFLAktyhZZyr61
aEFK0vJ+E59SQrTYl28aUvZlUobf/P54ndd5nnvO674e93nvlfIKtvEh4HC4
v+zz/7d0BquiWOLToY17G5Rp3YNgGnpnWxC9hqons9YR16MI1uNKGQp0lPp+
+anfSoAi2N+cs95C76IS71xaqrt9ABxXrEgrvqPU1XIBzmcaCtBSsjQQVT1O
1WjxUo8flYdvrYfEmaXfqf7Jmm5rKfJA2PGleCltkiq9/GR7w/f94FSBr/zt
O0edLnsXY3tXDjS9b4dRauapghF7yxtc5KBl9Vh2RPUCtSbe88ORnXLQJ5b3
ebF0icqpU77nW4IsIDRlh7k0JvVFfIdlgr8MOP91cpny3aQamo4XOPhJQdh/
519nE3HweTPmRKeSFDRm9Bwn1eAgQ7ZXH78gCYbSUcFh1XhYMNFnpcRIgqPp
m9r5UgQ0/RXGA4j7IPm6E2kmbSu8WeXaNzomBgNyl7QYvjtg7PC59GFOEWDJ
Jo+KzO+AWpu+8lt3hYF/p8EbGT1+8P31+pWFuTCoC1D9bVv5oZ9fxOxyrhBE
7dBtfPpZABq7m2QYFEHg4CXZRq0IArPzv9jrRfyQy/P4Tqa2EPAsuifJHecH
eR7iv7txQkC+ExXH2tgBR7lVy/s5heEa00Fv9t12yOQ6OK8jIgIXf6Voxp3m
BXFOmVSWhiio1g635axvhUcc5aPCMaLgb1BbfSJiK1A5pEgqqCiclxzNcprZ
Al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X2l9TTQwkp3V/6gA3ruS1j9cxpwv8g8FTRLB278
YHB/Gw1eP+dtKJmng+dGvuj3dzQIb7zC1bNIhxL36U+/P9Bg6GnCQw0mux5F
+mdxPTTIfLK+SV+jg3eFjif3Fxocro+yKfhHBzv3ZhehPhr8rVuu/MiiQ4Bv
F11ikAaPakOYm5t02LD2uqgwQoP/A8mMQ28=
"]]}},
AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948],
Axes->{True, True},
AxesLabel->{None, None},
AxesOrigin->{0, 0},
DisplayFunction->Identity,
Frame->{{False, False}, {False, False}},
FrameLabel->{{None, None}, {None, None}},
FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}},
GridLines->{None, None},
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
Method->{
"DefaultBoundaryStyle" -> Automatic, "DefaultMeshStyle" ->
AbsolutePointSize[6], "ScalingFunctions" -> None},
PlotRange->{{0, 200}, {-2.4677125216547755`, 182.94244641497784`}},
PlotRangeClipping->True,
PlotRangePadding->{{
Scaled[0.02],
Scaled[0.02]}, {
Scaled[0.05],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Output",
CellChangeTimes->{{3.699328573025703*^9, 3.699328605983554*^9}, {
3.699328637104641*^9, 3.6993286523617563`*^9}}]
}, Open ]],
Cell[BoxData[""], "Input",
CellChangeTimes->{{3.69973302487177*^9, 3.69973302583006*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"P",
RowBox[{"(",
RowBox[{"e", "=",
RowBox[{
RowBox[{"1", "|", "p"}], "=", "1"}]}], ")"}]}], "=", " ",
RowBox[{
RowBox[{"P",
RowBox[{"(",
RowBox[{
RowBox[{"e", "=", "1"}], ",",
RowBox[{"a", "=",
RowBox[{
RowBox[{"0", "|", "p"}], "=", "1"}]}]}], ")"}]}], "+",
RowBox[{"P",
RowBox[{"(",
RowBox[{
RowBox[{"e", "=", "1"}], ",",
RowBox[{"a", "=",
RowBox[{
RowBox[{"1", "|", "p"}], "=", "1"}]}]}], ")"}]}]}]}]], "Input",
CellChangeTimes->{{3.699732939068707*^9, 3.699732997420781*^9}, {
3.699733028243897*^9, 3.699733034365148*^9}, {3.699735558097137*^9,
3.6997355598391867`*^9}, {3.6997356693213263`*^9, 3.699735735342628*^9}}],
Cell[BoxData[""], "Input",
CellChangeTimes->{{3.699735817426743*^9, 3.6997359014155607`*^9}, {
3.6997359774850388`*^9, 3.699735984434414*^9}, {3.699736049119659*^9,
3.699736055198904*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"\[Pi]2", "=",
RowBox[{"1", "-", "\[Pi]1"}]}], ";",
RowBox[{"\[Pi]1", "=", "0.6"}], ";",
RowBox[{"\[Mu]1", "=",
FractionBox["i", "20"]}], ";",
RowBox[{"\[Mu]2", "=",
FractionBox["j", "20"]}], ";"}]], "Input",
CellChangeTimes->{{3.699860765985569*^9, 3.699860773802968*^9}, {
3.699860900948786*^9, 3.6998609093084593`*^9}, {3.699861047938961*^9,
3.699861125209921*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"T", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{
FractionBox["\[Pi]1", "\[Sigma]1"],
RowBox[{"Exp", "[",
FractionBox[
RowBox[{"-",
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-", "\[Mu]1"}], ")"}], "2"]}],
RowBox[{"2",
SuperscriptBox["\[Sigma]1", "2"]}]], "]"}]}], "+",
RowBox[{
FractionBox["\[Pi]2", "\[Sigma]2"],
RowBox[{"Exp", "[",
FractionBox[
RowBox[{"-",
SuperscriptBox[
RowBox[{"(",
RowBox[{"x", "-", "\[Mu]2"}], ")"}], "2"]}],
RowBox[{"2",
SuperscriptBox["\[Sigma]2", "2"]}]], "]"}]}]}], ",",
RowBox[{"{",
RowBox[{"i", ",", "0", ",", "2"}], "}"}], ",",
RowBox[{"{",
RowBox[{"j", ",", "0", ",", "2"}], "}"}]}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.6998606493540697`*^9, 3.699860758858279*^9}, {
3.699860792715432*^9, 3.699860818539006*^9}, {3.6998609149107637`*^9,
3.699860961851255*^9}, {3.699860992289991*^9, 3.6998610022817783`*^9}, {
3.699861057724975*^9, 3.699861115528637*^9}, {3.69986119902079*^9,
3.699861200898891*^9}, {3.699861238413978*^9, 3.699861240949098*^9}}],
Cell[CellGroupData[{
Cell[BoxData["T"], "Input",
CellChangeTimes->{3.699861278575601*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}]}], "}"}],
",",
RowBox[{"{",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}]}], "}"}],
",",
RowBox[{"{",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "20"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-",
FractionBox["1", "10"]}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}]}],
"}"}]}], "}"}]], "Output",
CellChangeTimes->{3.6998612791214952`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Manipulate", "[",
RowBox[{
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox["x", "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}], ",",
RowBox[{
FractionBox[
RowBox[{"0.6`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-", "1"}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]1", "2"]}]]}]]}], "\[Sigma]1"], "+",
FractionBox[
RowBox[{"0.4`", " ",
SuperscriptBox["\[ExponentialE]",
RowBox[{"-",
FractionBox[
SuperscriptBox[
RowBox[{"(",
RowBox[{
RowBox[{"-", "2"}], "+", "x"}], ")"}], "2"],
RowBox[{"2", " ",
SuperscriptBox["\[Sigma]2", "2"]}]]}]]}], "\[Sigma]2"]}]}],
"}"}], ",",
RowBox[{"{",
RowBox[{"x", ",", "0", ",", "3"}], "}"}]}], "]"}], ",",
RowBox[{"{",
RowBox[{"\[Sigma]1", ",", "1", ",", "3"}], "}"}], ",",
RowBox[{"{",
RowBox[{"\[Sigma]2", ",", "1", ",", "3"}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.6998611337798758`*^9, 3.699861184446114*^9}, {
3.699861293163105*^9, 3.699861293396492*^9}, {3.699861323851448*^9,
3.699861357342886*^9}}],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`\[Sigma]1$$ =
2.216, $CellContext`\[Sigma]2$$ = 2.66, Typeset`show$$ = True,
Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu",
Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ =
"\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`\[Sigma]1$$], 1, 3}, {
Hold[$CellContext`\[Sigma]2$$], 1, 3}}, Typeset`size$$ = {
360., {111., 115.}}, Typeset`update$$ = 0, Typeset`initDone$$,
Typeset`skipInitDone$$ = True, $CellContext`\[Sigma]1$18042$$ =
0, $CellContext`\[Sigma]2$18043$$ = 0},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm,
"Variables" :> {$CellContext`\[Sigma]1$$ = 1, $CellContext`\[Sigma]2$$ =
1}, "ControllerVariables" :> {
Hold[$CellContext`\[Sigma]1$$, $CellContext`\[Sigma]1$18042$$, 0],
Hold[$CellContext`\[Sigma]2$$, $CellContext`\[Sigma]2$18043$$, 0]},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$}, "Body" :>
Plot[{0.6 (
E^(-($CellContext`x^2/(
2 $CellContext`\[Sigma]1$$^2)))/$CellContext`\[Sigma]1$$) +
0.4 (E^(-($CellContext`x^2/(
2 $CellContext`\[Sigma]2$$^2)))/$CellContext`\[Sigma]2$$),
0.6 (E^(-((-1 + $CellContext`x)^2/(
2 $CellContext`\[Sigma]1$$^2)))/$CellContext`\[Sigma]1$$) +
0.4 (E^(-((-2 + $CellContext`x)^2/(
2 $CellContext`\[Sigma]2$$^2)))/$CellContext`\[Sigma]2$$)}, \
{$CellContext`x, 0, 3}],
"Specifications" :> {{$CellContext`\[Sigma]1$$, 1,
3}, {$CellContext`\[Sigma]2$$, 1, 3}}, "Options" :> {},
"DefaultOptions" :> {}],
ImageSizeCache->{405., {169., 174.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Manipulate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{{3.699861191699671*^9, 3.699861247255797*^9},
3.699861294487261*^9, {3.699861328142098*^9, 3.699861358504264*^9}}]
}, Open ]],
Cell[BoxData[
RowBox[{"pkIxth", "=",
RowBox[{
FractionBox[
RowBox[{"pxkIth", " ", "pk"}], "pxIth"], "=",
FractionBox[
RowBox[{"pxkIth", " ", "pk"}],
RowBox[{
SubscriptBox["\[CapitalSigma]", "k"], "pxkth", " "}]]}]}]], "Input",
CellChangeTimes->{{3.7000757762170258`*^9, 3.7000757976930323`*^9}, {
3.7000758507492228`*^9, 3.700075980356462*^9}, {3.7000760133965797`*^9,
3.700076013643976*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m1"}], ")"}], "^", "2"}], "-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m2"}], ")"}], "^", "2"}]}], "//",
"Simplify"}]], "Input",
CellChangeTimes->{{3.700083760489852*^9, 3.700083797009096*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], "Output",
CellChangeTimes->{3.700083797481674*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
FractionBox["p1",
RowBox[{
RowBox[{"p1", " ",
RowBox[{
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m1"}], ")"}], "^", "2"}]}], "]"}], "/",
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m1"}], ")"}], "^", "2"}]}], "]"}]}]}], "+",
RowBox[{"p2", " ",
RowBox[{
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m2"}], ")"}], "^", "2"}]}], "]"}], "/",
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m1"}], ")"}], "^", "2"}]}], "]"}]}]}]}]], "//",
"Simplify"}]], "Input",
CellChangeTimes->{{3.700085145745117*^9, 3.700085228254139*^9}}],
Cell[BoxData[
FractionBox["p1",
RowBox[{"p1", "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p2"}]}]]], "Output",
CellChangeTimes->{3.700087084735258*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
FractionBox["p2",
RowBox[{
RowBox[{"p1", " ",
RowBox[{
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m1"}], ")"}], "^", "2"}]}], "]"}], "/",
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m2"}], ")"}], "^", "2"}]}], "]"}]}]}], "+",
RowBox[{"p2", " ",
RowBox[{
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m2"}], ")"}], "^", "2"}]}], "]"}], "/",
RowBox[{"Exp", "[",
RowBox[{"-",
RowBox[{
RowBox[{"(",
RowBox[{"x", "-", "m2"}], ")"}], "^", "2"}]}], "]"}]}]}]}]], "//",
"Simplify"}]], "Input",
CellChangeTimes->{{3.7000870931724443`*^9, 3.700087118880889*^9}}],
Cell[BoxData[
FractionBox["p2",
RowBox[{
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-",
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}]}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p1"}], "+",
"p2"}]]], "Output",
CellChangeTimes->{{3.7000871059204597`*^9, 3.700087119472736*^9}}]
}, Open ]],
Cell[BoxData[
RowBox[{"Clear", "[",
RowBox[{"pk1", ",", "pk2"}], "]"}]], "Input",
CellChangeTimes->{{3.700086966628663*^9, 3.7000869718991127`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Solve", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"pk1", "==",
FractionBox["p1",
RowBox[{"p1", "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p2"}]}]]}], ",",
RowBox[{"pk2", "==",
FractionBox["p2",
RowBox[{
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-",
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}]}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p1"}], "+",
"p2"}]]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"p1", ",", "p2"}], "}"}]}], "]"}]], "Input",
CellChangeTimes->{{3.700087043925582*^9, 3.700087048154409*^9}, {
3.700087997894251*^9, 3.70008805501082*^9}}],
Cell[BoxData[
RowBox[{"{", "}"}]], "Output",
CellChangeTimes->{3.7000880553202763`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Solve", "[",
RowBox[{
RowBox[{"pk1", "==",
FractionBox["p1",
RowBox[{"p1", "+",
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p2"}]}]]}], ",", "p2"}],
"]"}]], "Input",
CellChangeTimes->{{3.7000885642334747`*^9, 3.700088574007001*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"{",
RowBox[{"p2", "\[Rule]",
RowBox[{"-",
FractionBox[
RowBox[{
SuperscriptBox["\[ExponentialE]",
RowBox[{
RowBox[{"-",
RowBox[{"(",
RowBox[{"m1", "-", "m2"}], ")"}]}], " ",
RowBox[{"(",
RowBox[{"m1", "+", "m2", "-",
RowBox[{"2", " ", "x"}]}], ")"}]}]], " ", "p1", " ",
RowBox[{"(",
RowBox[{
RowBox[{"-", "1"}], "+", "pk1"}], ")"}]}], "pk1"]}]}], "}"}],
"}"}]], "Output",
CellChangeTimes->{3.700088574315633*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{
FractionBox["p2",
RowBox[{
RowBox[{