Explain the ben ford law

Assignment Help Basic Computer Science
Reference no: EM131609083

Question: Programming Project asked you to explore Ben ford's Law. An easier way to write the program is to use an array to store the digit counts. That is, count [0] might store the number of times 0 is the first digit (if that is possible in your data set), count [1] might store the number of times 1 is the first digit, and so forth. Redo Programming Project 3.15 using arrays. Write a program that tests Ben ford's Law. Collect a list of at least 100 numbers from some real-life data source and enter them into a text file. Your program should use an array to store the digit counts. That is, count [0] might store the number of times 0 is the first digit (if that is possible in your data set), count [1] might store the number of times 1 is the first digit, and so forth. For each digit, output the percentage it appears as the first digit.

Programming Project: This problem is based on a "Nifty Assignment" by Steve Wolfman ( https://nifty. stanford.edu/2006/wolfman-pretid). Consider lists of numbers from real-life data sources; for example, a list containing the number of students enrolled in different course sections, the number of comments posted for different Facebook status updates, the number of books in different library holdings, the number of votes per precinct, etc. It might seem like the leading digit of each number in the list could be 1-9 with an equally likely probability. However, Benford's Law states that the leading digit is 1 about 30% of the time and drops with larger digits. The leading digit is 9 only about 5% of the time. Write a program that tests Benford's Law. Collect a list of at least 100 numbers from some real-life data source and enter them into a text file. Your program should loop through the list of numbers and count how many times 1 is the first digit, 2 is the first digit, etc. For each digit, output the percentage it appears as the first digit.

Reference no: EM131609083

Questions Cloud

Explain the role self-concept plays in ethical communication : Describe self-concept.Explain the role self-concept plays in ethical communication. Describe your self-concept and whether it is generally positive or negative
Homeland security act of 2002 : Research the following: U.S. Patriot Act The Domestic Security Enhancement Act of 2003 Homeland Security Act of 2002 .
Discuss correctional facilities in china : Discuss correctional facilities in china, Japan, and Germany. Be sure to address how they are different from American correctional facilities
Describe how the issue tests the new world age : Briefly summarize a civil rights issue-relate your subject to Dr. King's values and describe how the issue tests the New World Age
Explain the ben ford law : Programming Project asked you to explore Ben ford's Law. An easier way to write the program is to use an array to store the digit counts.
What is the role of vision in successful leadership : What is the role of vision in successful leadership? What is the role of effective communication - Which competencies are most important in leadership
Challenges entrepreneurs face in the first : Based on what you have learned, what are some of the challenges entrepreneurs face in the first 2 years of a start-up?
Determine your non-negotiable items : Determine your non-negotiable items. Will it offer you opportunities to advance? Are you comfortable sitting at a desk all day, or do you prefer to travel?
What are pros and cons of using social media : What are pros and cons of using social media as school communication tool? Identify 2-3 common social media marketing mistakes that schools make.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Heptadeca class that encapsulates a heptadeca number

Write a Heptadeca class that encapsulates a Heptadeca number value. A Heptadeca number is one with 17 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G. The methods the class has are: public void read(), public void set(String), public voi..

  Display the commissions earned last year by all sales employ

1. Create a VIEW dbo.vw_Commissions to display the commissions earned last year by all sales employees. Round the result set to two decimal places and do not include any salesperson who did not earn a commission. Include the salesperson name, the com..

  Interpret your interval in context

Crohn's disease. In 2002 the medical journal The Lancet reported that 335 of 573 patients suffering from Crohn's disease responded positively to injections of the arthritis fighting drug infliximab.

  Simple income-expenditure model

In the simple income-expenditure model with no taxes, government spending or foreign trade, if the marginal propensity to consume equals 0.9, the multiplier equals?

  Create three classes for the linked list

The input file will be in the following format: one word per line followed by either N or V in parenthesis: apple(N) peach(N) eat(V) .

  Design and implement a character generator for dungeons

Use tables and formulas also from workshop file to complete assignment. Design and Implement a character generator for Dungeons and Dragons. It is to have the following specifications:

  Design and implement an application

After all inputhas been processed, print all of the values (with the number ofoccurrences) that were entered one or more times.

  Evaluate the current state of the us economy

In a two- to three-page paper (not including title and references pages), evaluate the current state of the U.S. economy. Using your evaluation of the U.S. economy's current state, explain how a Keynesian, Monetarist, and Neoclassical Theorist wou..

  Remove the break statement from the program

A criticism of the break statement and the continue statement is that each is unstructured. Actually, break statements and continue statements can always.

  What tasks will the project accomplish

Vision or preliminary scope of the project-What tasks will the project accomplish?

  Role in defining healthcare documentation

Go to Accreditation Association for Ambulatory Health Care (AAAHC) http;//www.aaahc.org/ and In a brief summary, outline what type of organization it accredits or reviews and its role in defining healthcare documentation.

  Write a java program that prints the numbers

FizzBuzz problem: Write a Java program that prints the numbers from 1 to 50. But for multiples of three print"Fizz"instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "Fizz..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd