Let A and B each be random real numbers chosen from the uniform interval (0,1).
Call Z the tenths place digit of AB.
Find the probability distribution of Z.
(In reply to
re: towards an analytic solution - numeric integration by Charlie)
9 0.2870992757
8 0.1659481797
7 0.1254967284
6 0.1008015310
5 0.0831290511
4 0.0693004426
3 0.0577480536
2 0.0474825330
1 0.0375744516
0 0.0254197533
For dg = 9 To 1 Step -1
lp = Log(dg / 10)
Text1.Text = Text1.Text & crlf
n = 10000000
tot = 0
For x = 1 / (2 * n) To 1 - 1 / (2 * n) Step 1 / n
tot = tot + Exp(lp / x)
Next
Text1.Text = Text1.Text & dg & " " & mform(1 - tot / n - prev, "0.0000000000")
prev = 1 - tot / n
DoEvents
Next dg
Text1.Text = Text1.Text & crlf & dg & " " & mform(1 - prev, "0.0000000000")
and the previously discerned accuracy using 10,000,000 intervals in the numeric integration.
|
Posted by Charlie
on 2014-10-29 15:41:37 |