Provide a class FirstDigitDistribution that works just like the LastDigitDistribution class of Worked Example 9.2, except that

Question:

Provide a class FirstDigitDistribution that works just like the LastDigitDistribution class of Worked Example 9.2, except that it counts the distribution of the first digit of each value. (It is a well-known fact that the first digits of random values are not
uniformly distributed. This fact has been used to detect accounting fraud, when sequences of transaction amounts had an unnatural distribution of their first digits.)


Data from Example 9.2,

n this Worked Example, we investigate properties of number sequences. A number sequence can be a sequence of measurements, prices, random values, or mathematical values (such as the sequence of prime numbers). There are many interesting properties that can be investigated. For example, you can look for hidden patterns or test whether a sequence is truly random. Problem Statement Investigate how the last digit of each value is distributed. For a given sequence of values, produce a chart such as

0: 105
1: 94
2: 81
3: 112
4: 89
5: 103
6: 103
7: 100
8: 108
9: 105

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: