• kth.se
  • Student web
  • Intranet
  • kth.se
  • Student web
  • Intranet
Login
DA2210 HT18 (50426)
Homework 3 Explanation and causality
Skip To Content
Dashboard
  • Login
  • Dashboard
  • Calendar
  • Inbox
  • History
  • Help
Close
  • Min översikt
  • DA2210 HT18 (50426)
  • Assignments
  • Homework 3 Explanation and causality
  • Home
  • Modules
  • Assignments
  • Files
  • Pages
  • Media Gallery
  • Course Evaluation

Homework 3 Explanation and causality

  • Due Oct 2, 2018 by 10pm
  • Points 1
  • Submitting an external tool
  • Available Sep 28, 2018 at 3pm - Jan 10, 2019 at 11:59pm
This assignment was locked Jan 10, 2019 at 11:59pm.

Reading

Reading: See reading list for lecture 3. You will also want to review the lecture notes from the first two lectures.

 

Two studies

 

1) A group of students are asked to write a program solving a specific problem.

Each student may choose one of two groups:

  • Group A are instructed to comment all their code according to a given Style Guide.
  • Group B does not need to comment their code at all.

When running the resulting programs, it turns out that the best programs were from group A (the commented programs).

 

Can we draw the conclusion that comments improve the code? Explain!

 

2) Another group of students are asked to write a program solving a specific problem.

They are randomly assigned to two groups:

  • Group C will use Haskell (a functional programming language)
  • Group D will use Java

When running the resulting programs, it turns out that the fastest running programs were from group D.

 

Can we draw the conclusion that functional programming languages give slower code? Explain!


Benford's law

 

''Thirty percent of all numbers start with the digit 1.''

This statement is supposed to be true for collections of numbers with widely varying orders of magnitude, like populations of cities or byte sizes of files.  

  1. Test Benford's law by downloading a data file from gapminder Links to an external site. and calculating first digit statistics.
  2. Illustrate your statistics with a graph or bar chart. Do not forget to tell us which data you used.
  3. Use google scholar Links to an external site. to find an example of how Benford's law is used in practice. Give a reference to the paper you found and explain the idea in one sentence.
  4. Do you consider Benford's law a hypothesis, a conjecture or a mathematical theorem?

 

 









1538510459 10/02/2018 10:00pm
Please include a description
Additional Comments:
Rating max score to > pts
Please include a rating title

Rubric

Find Rubric
Please include a title
Find a Rubric
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
 
 
 
 
 
 
 
     
Can't change a rubric once you've started using it.  
Title
Criteria Ratings Pts
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
Total Points: 5 out of 5