Question: Computer Science Data Sci questions. Sorry that there are many small questions but please help me as many as you can. I will appreciate. I
Computer Science Data Sci questions. Sorry that there are many small questions but please help me as many as you can. I will appreciate. I will give an upvote.
The problems use the jupyter note book with python 3

Let X = the leading digit of a randomly selected number from a large accounting ledger. For example, if we randomly draw the number $20,695, then 2. People who make up numbers to commit accounting fraud tend to give X a (discrete) uniform distribution, ie, PX,...,9). However there is empirical evidence that suggests that naturally occurring numbers (e.g., numbers in a non-fraudulent accounting ledgers) have leading digits that do not follow a uniform distribution. Instead, they follow a distribution defined by the following probability mass function: x+1 en f(x) = log,a(-) for x =1,2, for x = 1.2, ,9 9 Part A: Write a function pmf natural that implements that f(x) is a well-defined probability mass function. Your function should take in an integer x and return x = P X x Use your function to argue S]: def pmf_natural (x): #something return True Part B: Use the function you wrote above to make two bar plots describing the pmf of the naturally occurring numbers as well as the discrete uniform distribution. Make sure that the x- and y-limits on your plots are the same so that the two distributions are easy to compare. Please make one plot directly above the other, Part C: Write a function cdf_natural that implements the cumulative distribution function F(y) for X and use it to compute the probability that the leading digit in a number is at most 4 and at most 5. [6]: def cdf_natural(y): # something return cdf
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
