MAS115: REASSESSMENT PROJECT
SAM MARSH, ALEX FLETCHER, AND PAUL BLACKWELL
The task
Below you will find some discussion of generalized means. Your task is to investigate this area — using Python or R where appropriate — and to create a website which presents your findings.
You will find suggestions on what to investigate. You are free to investigate things that have not been suggested. It is not essential to cover all of the things that have been, although it is strongly recommended that you do.
Your write-up could involve some background material to the problem, but you must ensure this isn’t plagiarised from other sources and is genuinely your own work. Any material that relies on other sources must be properly referenced and credited to them.
You should aim to create a self-contained account of the subject that your peers who aren’t taking MAS115 would be interested in reading.
Submission
There is no minimum or maximum length for the project. The project will be assessed in the same way as group projects during the semester; that is, we expect you to do as much work as a whole group did during the semester. You may link to Python or R scripts, external sites or any other appropriate material. The title on the index page should be ‘Generalized Means: Reassessment Project for (your registration number)’.
You may use any of the CSS files which appear on the course webpage. You are also free to create one of your own. However, you may be criticised if your CSS file does not allow easy readability.
You will upload your website via the upload system on the course webpage.
The deadline for uploading the project is midnight at the end of Friday 9th August.
You will receive a mark out of 100 for the project. Those who failed MAS115 at the first attempt will need 40 or more to pass the reassessment. Those who were Not Assessed will receive an uncapped mark. To achieve a mark of 40 will require a good project (which probably goes beyond the suggested tasks) with clear evidence of programming ability (in Python or R), website construction (HTML) and use of LATEX (most likely in the form of mathe- matics appearing on the webpage using Mathjax).
1
2 SAM MARSH, ALEX FLETCHER, AND PAUL BLACKWELL
Late work and plagiarism
Late work. It is important that work is submitted on time. Any work submitted after the deadline may be subject to a penalty and could be given a mark of zero. Anybody with circumstances affecting their ability to hand in the work on time must contact Dr Marsh or Prof Blackwell in advance of the hand-in date.
Plagiarism. The project must be your own work. You must not work with or share material with other students (except via the MAS115 discussion board which we hope will remain open). Please also ensure you have read the slides on plagiarism from the Week 11 lecture. Where we judge that two or more pieces of work are too similar, or work has been plagiarised from a source, we may return a mark of zero for those projects. Please bear this in mind!
Final comments
Here are some final thoughts to help you with the project.
• Make use of the fact that this project is a webpage rather than a document. This means that you will be able to link to actual .py or .r files, or embed them in the page using repl.it, trinket.io or R-fiddle as an alternative to simply displaying code.
• Mathjax makes displaying maths on webpages easy, using LATEX code for typesetting formulas.
• Make sure you only use images that are royalty-free, and save them to your computer.
• Use other internet resources (e.g. Wikipedia), but don’t plagiarise. Do link to interesting pages you have found if appropriate.
• Make use of the MAS115 discussion board when you’re stuck.
• You must demonstrate competence in programming, web-design, and
mathematical typesetting in order to pass the module.
MAS115: REASSESSMENT PROJECT 3
Generalized means
Suggested task. Write a script which takes two numbers as inputs and returns both their arithmetic and geometric means. Extend your script so that it can take a list of num- bers as an input and return the arithmetic and geometric means of those.
Suggested task. There is a link between the arithmetic and geometric means of two numbers, referred to as the AM-GM inequality. Look into what this is and why it’s true.
Another variant is to calculate an average proceeds as follows. Start with
The most common way to generate an average of a finite set of numbers {a1,…,an} is to use the arithmetic mean, 1(a1 +…+an). However, there
n
are other options. The geometric mean is calculated as (a1 × . . . × an ) n .
two numbers a and b. Let a0 = a and b0 = b. We then define sequences by
an+1 = an+bn and bn+1 = √anbn. 2
1
Suggested task. Write a script which takes two numbers as inputs and generates these sequences. If you are using Python, you should use the decimal module for better con- trol of accuracy (Google “Python decimal”).
Suggested task. Using your script above, investigate what happens for some choices of a and b. You should find that an and bn rapidly approach each other. If an and bn agree to k decimal places, to how many decimal places does it seem that an+1 and bn+1 agree?
It turns out that for starting values a0 = a and b0 = b, the two sequences (an) and (bn) both converge to the same limit, written M(a,b). This is known as the arithmetic-geometric mean of a and b.
Suggested task. It turns out that there’s a connection be- tween M(a,b) and the integral
π
2 dθ
I(a,b)=22 22. 0 a cos θ+b sin θ
What can you find out about this?
Suggested task. The integral I(a,b) above doesn’t have a closed-form for most values of a and b, but for some it does. Can you find a way of using M(a,b) for good choices of a and b to get an estimate for π?
The above is a starting point for the project. There are other generalized means which one can use to average numbers. You should look into the possibilities and report interesting findings you make, investigating them using Python or R.