ITECH1400 Foundations of Programming Assignment 2

{`
Federation University
School of Science Engineering and Information Technology
ITECH1400 Foundations of Programming
`}

Logarithms, Benford’s Law and Fraudulent Data

Overview

In this assignment you will write an application in Python that will apply Benford’s Law to a given set of your own data. This is an individual assignment.

Timelines and Expectations

Percentage Value of Task: 20%

Due: Friday 5 June 2020 @17:00 (week 11)

Minimum time expectation: 20 hours

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:

K1. Identify and use the correct syntax of a common programming language.

K2. Recall and use typical programming constructs to design and implement simple software solutions.

K3. Reproduce and adapt commonly used basic algorithms.

K4. Explain the importance of programming style concepts (documentation, mnemonic names, indentation)

S2. Write and implement a solution algorithm using basic programming constructs. S3. Demonstrate debugging and testing skills whilst writing code.

A1. Develop self-reliance and judgement in adapting algorithms to diverse contexts.

A2. Design and write program solutions to identified problems using accepted design constructs.

Assessment Details

Background

sports statistics, molecular weights and so on – and it is base and scale invariant – the length of rivers could be in miles, kilometres, metres or even cubits.

Theory

Although you do not need to know the derivation[1] or proof of Benford’s law, all you need to know is how to apply it to a set of data.

Benford’s law states[2]:

Pr(D1 = d1) = log10(1+1/d1) d1 =1, 2,..., 9(Equation 1)

So that, for the first digit in a number, the probability that this digit is a ‘1’ is:

Pr(D1 = 1) = log10(1+1/1)
log10(2)
=0.3010

or about 30.1%.

Similarly for the remaining digits 2-9.

If we do this for all the digits and plot them as a bar graph, we get:

ITECH1400 Foundations of Programming Assignment 2 Image 1

Your Task

Develop a Python program which will load up a set of data, determine the frequencies of the leading digits and compare them with the predicted distribution of Benford’s law. Display this in a bar chart and a table of values. For example:

Digit 1: Observed = 0.321 Expected = 0.301

Digit 2: Observed = 0.153 Expected = 0.176 and so on up till digit 9.

We shall look at three cases.

An Excel spreadsheet has been taken from Office-Watch: Benford’s Law and Excel[3] to let you quickly visualize the Python application that we need make.

Case 1 - Fibonacci series[4]

This series begins with two numbers 1,1 – these two numbers are added to continue the series giving rise to the following (only the first 8 terms of the series are shown here):

1,1,2,3,5,8,13,21,. . .

There are many examples of this pattern in Nature and the series is closely related to the Golden [5] ratio.

Using the Excel spreadsheet generate a Fibonacci series up to the 24th term and see if the first digits obey Benford’s Law. Does it get better if you add more terms?

The Chi-test[6] measures how close an actual value is to the expected value – the closer it is to 100% the closer the actual value is to the expected value. In our case, we are testing how close the frequency of each digit in our dataset is to Benford’s prediction for that digit.

What is the value of the ChiTest comparison for this Fibonacci series? Does it get better if we add more terms to the series?

Case 2 – Fibonacci numbers & Benford’s law using Python

In this case you are to repeat the analysis in Case 1 but using you Python code.

Case 3 – Length of Rivers[7] in the World

In this case, use your Python code to see whether the lengths of rivers in the world follow Benford’s law.

Fraud detection using Benford’s Law

One use of Benford’s Law is to detect cases of Fraud. Consider the 1993 case of State of Arizona v Nelson. The accused diverted nearly $2M to fake vendors in an attempt to defraud the State. The frequency of first digits in the written cheques clearly violates Benford’s Law leading to a conviction.

ITECH1400 Foundations of Programming Assignment 2 Image 2

Another case is that of Enron in its posting of revenue for the year 2000. Comparison of the frequency of first digits versus the expected frequency shows large discrepancies. The company went bankrupt the following year – one of the greatest financial failures in history.

ITECH1400 Foundations of Programming Assignment 2 Image 3

Submission

A report is to be submitted in this assignment. There is a discussion section in the report in which you can apply step 6 in the six-step problem solving process and ask the four questions often used in evaluating a solution.

More details on academic reports are available - please refer to this link:

https://federation.edu.au/current-students/learning-and-study/online-help-with/guides-to-your-assessments

There are three important parts at the link above:

1. General Guide to Writing and Study Skills

This section describes the content of a report – refer to page 34 – Abstract, Table of Contents, Introduction and Conclusion and so on.

  1. General Guide to Referencing

APA referencing style is described in this section – EndNote is also available to students

3. Assignment Layout and Appearance Guidelines

This section describes how the report should appear: margin sizes, fonts, how diagrams and tables are presented and so on.

You must supply your program source code files and your documentation, together with any files required to run your application, as a single zip file named as follows:

<YOUR-NAME>_<YOUR-STUDENT-ID>.zip

e.g. Ada_LOVELACE_30331815.zip

You may supply your word processed documentation in either Microsoft Word or LibreOffice/OpenOffice formats only – no proprietary Mac specific formats, please.

Assignments will be marked on the basis of fulfilment of the requirements and the quality of the work.

In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to):

  • Incomplete implementation(s), and
  • Incomplete submissions (e.g. missing files), and
  • Poor spelling and grammar.

You might be asked to demonstrate and explain your work.

Marking Criteria/Rubric

Task

Mark

1

Pseudo-code for all Python scripts

10

2

Final Python code (Exceptions 2 marks), annotated with author details and with comments throughout the code (2 marks), consistent with pseudo-code

10

3

Tests to check that Python code is working correctly

10

4

Case 1 - Fibonacci numbers using example Excel sheet

5

5

Case 2 - Fibonacci numbers using your Python script – bar chart (10) & table

(5)

15

6

Case 3 - Lengths of Rivers using your Python script – bar chart (10) & table

(5)

15

7

Discussion (including 4 Questions in Step 6)

15

8

Report: Abstract, Title Page, Table of Contents (including Figures & Tables),

Introduction, Method, Results, Discussion (including the 4 Questions in Step 6 of problem solving), Acknowledgements & Statement of Authorship, References

20

TOTAL

100

Final Grade

20

[1]See, for example, Miller, S. J. (2015). A Quick Introduction to Benford’s Law. In S. J. Miller (Ed.), Benford's Law (pp. 3-22): Princeton University Press.

[2]Nigrini, M. J., & ProQuest (Firm). (2012). Benford's law applications for forensic accounting, auditing, and fraud detection, Wiley corporate F & A, p.5

[3]https://office-watch.com/2012/benfords-law-and-excel/

[4]https://en.wikipedia.org/wiki/Fibonacci_number

[5]https://en.wikipedia.org/wiki/Golden_ratio

[6]Also written as 2-test

[7]https://en.wikipedia.org/wiki/List_of_rivers_by_length

Diploma Universities Assignments

Laureate International Universities Assignment

Holmes Institute Assignment

Tafe NSW

Yes College Australia

ACC508 Informatics and Financial Applications Task 2 T2, 2019

ACC512 Accounting

ACC520 Legal Regulation of Business Structures Semester 2, 2019

ACCT20074 Contemporary Accounting Theory Term 2 Assessment 3

AERO2463 Computational Engineering Analysis : Assignment 4

B01DBFN212 Database Fundamentals Assessment 1

BE01106 - Business Statistics Assignment

BFA301 Advanced Financial Accounting

BFA504 Accounting Systems Assessment 3

BSB61015 Advanced Diploma of Leadership and Management

BSBADV602 Develop an Advertising Campaign

BSBCOM603 Plan and establish compliance management systems case study

BSBCOM603 Plan and establish compliance management systems Assessment Task 1

BSBCOM603 Plan and establish compliance management systems Assessment Task 2

BSBCOM603 Plan and establish compliance management systems Assessment Task 3

BSBFIM501 Manage Budgets And Financial Plans Assessment Task 1

BSBHRM602 Manage Human Resources Strategic Planning

BSBINM601 Manage Knowledge and Information

BSBWOR501 Assessment Task 3 Plan Personal Development Plan Project

BSBMGT517 Manage Operational Plan

BSBWHS521 Ensure a Safe Workplace For a Work Area

BSBWRK510 Manage employee relations

BUSS1030 Accounting, Business and Society

CAB202 Microprocessors and Digital Systems Assignment Help

CHC40213 Certificate IV in Education Support

CHCAGE001 Facilitate the empowerment of older people

CHCAGE005 Provide support to people living with dementia

CHCCCS023 Support independence and wellbeing

CHCCCS025 Support relationships with carers and families

CHCCOM005 Communicate and CHCLEG001 Work Legally Ethically

CHCDIS002 Follow established person-centred behaviour supports

CHCECE019 Early Childhood Education and Care

CHCHCS001 Provide home and community support services

COMP10002 Foundations of Algorithms

COMP90038 Algorithms and Complexity

COSC2633/2637 Big Data Processing

COSC473 Introduction to Computer Systems

CPCCBC5011A Manage Environmental Management Practices And Processes In Building And Construction

CPCCBC5018A Apply structural Principles Medium rise Construction

CSE3OSA Assignment 2019

ELEC242 2019 Session 2

ENN543 Data Analytics and Optimisation

ENN543 Data Analytics and Optimisation Semester 2, 2019

FINM202 Financial Management Assessment 3 Group Report

Forensic Investigation Case Assignment ECU University

HA2042 Accounting Information Systems T2 2019

HC1010 Holmes Institute Accounting For Business

HC2112 Service Marketing and Relationship Marketing Individual Assignment T2 2019

HC2121 Comparative Business Ethics & Social Responsibility T2 2019

HI5002 Holmes Institute Finance for Business

HI5003 Economics for Business Trimester 2 2019

HI5004 Marketing Management T1 2020 Individual Report

HI5004 Marketing Management T1 2020 Group Report

HI5004 Holmes Institute Marketing Management

HI5014 International Business across Borders Assignment 1

HI5014 International Business across Borders

HI5017 Managerial Accounting T2 2019

HI5017 Managerial Accounting T1 2019

HI5019 Tutorial Questions 1

HI5019 Strategic Information Systems for Business and Enterprise T1 2020

HI5019 Holmes Institute Strategic Information Systems T2

HI5019 T2 2019

HI5019 T1 2019

HI5020 Corporate Accounting T3 2019

HI5020 Corporate Accounting T2 2019

HI6005: Management and Organisations in a Global Environment

HI6006 Tutorial questions

HI6006 Competitive Strategy Individual T1 2020

HI6006 Holmes Institute Competitive Strategy

HI6006 Competitive Strategy T3 2019

HI6007 Statistics for business decisions

HI6007 Assessment 2 T1 2020

HI6007 T1 2019

HI6008 T2 2019

HI6008 Holmes Institute Research Project

HI6025 Accounting Theory and Current Issues

HI6026 Audit, Assurance and Compliance Assignment Help

HI6026 Audit, Assurance and Compliance

HI6027 business and corporate law tutorial Assignment T1 2021

HI6027 Business and Corporate Law T3 2019

HI6027 Business and Corporate Law T2 2019

HI6028 Taxation Theory, Practice and Law T2 2021

Hi6028 taxation theory, practice and law Final Assessment t1 2021

HI6028 Taxation Theory, Practice and Law T2 2019

HI6028 Taxation Theory T1 2019

HI6028 Taxation Law Holmes

HLTAAP001 Recognise healthy body systems

HLTWHS002 Follow safe practices for direct client care

HOTL5003 Hotel Property and Operations

HPS771 - Research Methods in Psychology A

HS2021 Database Design

ICTICT307 Customise packaged software applications for clients

IFN619 Data Analytics for Strategic Decision Makers

INF80028 Business Process Management Swinburne University

ISY2005 Case Assignment Assessment 2

ISYS326: Information Systems Security Assignment 2, Semester 2, 2019

ITAP3010 Developing Data Access Solutions Project

ITECH1103- Big Data and Analytics – Lab 3 – Working with Data Items

ITECH1103- Big Data and Analytics Assignment Semester 1, 2020

ITECH 5500 Professional Research and Communication

Kent Institute Australia Assignment

MA5830 Data Visualisation Assignment 2

MGMT7020 Project Management Plan

Mgt 301 Assessment 3

MGT215 Project Management Individual Assignment

MIS102 Data and Networking Assignment Help

MITS4002 Object Oriented Software Development

MITS5002 Software Engineering Methodology

MKT01760 Tourism Planning Environments Assessment 4

MKT01760 Tourism Planning Environments

MKT01906 International Tourism Systems

MKT5000 Marketing Management S2 2019

MNG03236 Report Writing SCU

MRE5003 Industrial Techniques In Maintenance Management Assignment 4

MRE5003 Industrial Techniques In Maintenance Management Assignment 3

MRE5003 Industrial Techniques In Maintenance Management

Network Security and Mitigation Strategies Answers

NIT2213 Software Engineering Assignment

NSB231 Integrated Nursing Practice Assessment Task 1

Science Literacy Assessment 4

SIT323 Practical Software Development T 2, 2019

SIT718 Using aggregation functions for data analysis

SITXCOM002 Show Social and Cultural Sensitivity

TLIL5055 Manage a supply chain

TLIR5014 Manage Suppliers

USQ ACC5502 Accounting and Financial Management

UTS: 48370 Road and Transport Engineering Assessment 2

CHCAGE001 Facilitate the empowerment of older people

CHCAGE005 Provide support to people living with dementia

CHCCCS011 Meet personal support needs

CHCCCS015 Provide Individualised Support

CHCCCS023 Support independence and wellbeing

CHCCCS025 Support relationships with carers and families

CHCCOM005 Communicate and work in health or community services

CHCDIS001 Contribute to ongoing skills development

CHCDIS002 Follow established person-centred behaviour supports

CHCDIS003 Support community participation and social inclusion

CHCDIS005 Develop and provide person-centred service responses

CHCDIS007 Facilitate the empowerment of people with disability

CHCDIS008 Facilitate community participation and social inclusion

CHCDIS009 Facilitate ongoing skills development

CHCDIS010 Provide person-centred services

CHCDIV001 Work with diverse people

CHCHCS001 Provide home and community support services

CHCLEG001 Work legally and ethically

CHCLEG003 Manage legal and ethical compliance

HLTAAP001 Recognise healthy body systems

HLTAID003 Provide First Aid

HLTHPS007 Administer and monitor medications

HLTWHS002 Follow safe work practices for direct client care

Assignment 2 Introduction to Digital Forensics

MGT603 Systems Thinking Assessment 1

MGT603 Systems Thinking Assessment 2

Hi5017 Managerial Accounting T1 2021

HI6028 Taxation Theory, Practice and Law T1 2021

OODP101 Assessment Task 3 T1 2021

ITNE2003R Network Configuration and Management Project

Australia Universities

ACT

Australian Catholic University

Australian National University

Bond University

Central Queensland University

Charles Darwin University

Charles Sturt University

Curtin University of Technology

Deakin University

Edith Cowan University

Flinders University

Griffith University

Holmes Institute

James Cook University

La Trobe University

Macquarie University

Monash University

Murdoch University

Queensland University of Technology

RMIT University

Southern Cross University

Swinburne University of Technology

University of Adelaide

University of Ballarat

University of Canberra

University of Melbourne

University of Newcastle

University of New England

University of New South Wales

University of Notre Dame Australia

University of Queensland

University of South Australia

University of Southern Queensland

University of Sydney

University of Tasmania

University of Technology Sydney

University of the Sunshine Coast

University of Western Australia

University of Wollongong

Victoria University

Western Sydney University

Year 11 - 12 Certification Assignment

Australian Capital Territory Year 12 Certificate

HSC - Higher School Certificate

NTCE - Northern Territory Certificate of Education

QCE - Queensland Certificate of Education

SACE - South Australian Certificate of Education

TCE - Tasmanian Certificate of Education

VCE - Victorian Certificate of Education

WACE - Western Australia Certificate of Education