The number 24 is a multiple of 6, and its reversal, 42, is also a multiple of 6.
What is the probability that the reversal of any randomly-chosen multiple of 6 is also a multiple of 6?
(In reply to
re(2): Benford's Law by Steve Herman)
good excuse to write a program:
hits=0; ct=0;set=[];
for n=6:6:100000000
ns=num2str(n);
if contains('2468',ns(1))
hits=hits+1;
end
ct=ct+1;
set(end+1)=hits/ct;
if mod(length(set),11111)==0
disp(mean(set));
end
end
finding the average of all the averages for limiting n anywhere from 6 to 100 million (or rather, 99999996) as 0.423537640384863.
However the final average, through 99999996 was 0.444444197777768.
Edited on February 22, 2024, 10:14 pm
|
Posted by Charlie
on 2024-02-22 21:54:26 |