Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Math 381 Homework #1: Deriving the Approximation of Pi and Analyzing Histograms - Prof. Ti, Assignments of Mathematics

Instructions for math 381 homework #1, due in january 2008. The homework includes deriving the formula for approximating pi with a needle of length l and parallel lines placed a distance d apart, analyzing histograms of sample averages from a simulation of rolling a fair die, and reading an article about dogs and calculus. Students are expected to explain their work and provide histograms as part of their submission.

Typology: Assignments

Pre 2010

Uploaded on 03/18/2009

koofers-user-yar
koofers-user-yar 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Math 381 Homework #1: Deriving the Approximation of Pi and Analyzing Histograms - Prof. Ti and more Assignments Mathematics in PDF only on Docsity! Math 381 Chartier Homework #1 Winter 2008 Homework due Friday, January 18 (at beginning of class) 1. In class, we considered Buffon’s Needle experiment where the length of a needle is 1 unit and the distance between parallel lines on a paper is also 1 unit. More specifically, if you drop the needle n times and find that the needle crosses a line c times then we derived the formula: π ≈ 2n c . A modification of the theory can generalize this result for L < D. Derive the formula that approximates π for a needle of length L and parallel lines placed a distance of D apart, where L < D. In your solution explain each step of your work. 2. On the course web page are pages 1–4 from S. M. Ross, Simulation, Academic Press, 1997. Read the introduction (pages 1–4). Complete problem #1 from Ross that appears on pages 3–4. 3. Programming in matlab will be an important component of many homework assignments through- out the remainder of the quarter. For this homework problem, download h1.m from from the course web page. This is a matlab M-file. To run the file, launch matlab on a computer in our classroom (or the adjacent Mac classroom). Change the directory so that you are in the directory containing h1.m. Simply type at the >> prompt h1. The program will run. The program is set up to use a random variable Y with the following probability distribution: y 1 2 3 4 5 6 p(y) 1/6 1/6 1/6 1/6 1/6 1/6 This distribution allows us to consider Y as the random variable determined by any one of the six possible outcomes that can be observed when a fair die is rolled. This M-file simulates the rolling of a fair die rolls times. (Note that rolls is a variable in the matlab code.) The sample average for the outcomes y1, y2, . . . , yrolls is found and recorded in a histogram. The process of rolling the die rolls times, finding the sample average, and recording the result in a histogram is repeated experiments times. The program outputs a histogram of the probability distribution and also for the sample averages of the repeated experiments. (a) Run this program twice. Insert1 the histograms of sample averages for both experiments into a document and answer the following: • Are the histograms exactly the same? Why or why not? • What underlying distribution do the histograms follow? How do you know? (b) What underlying distribution will the histogram of sample averages follow if you set rolls = 1? Explain your answer. (c) Change the program to the following probability distribution: y 1 2 3 4 5 6 p(y) 4/24 1/12 1/24 1/24 1/24 15/24 Set rolls = 3. Run the program several times and copy a characteristic histogram of the sample averages into a document. Repeat this for rolls = 10 and rolls = 100 and answer the following question. What underlying distribution appears with increasing rolls? Explain what you see. If you have any doubts in your answer, submit your matlab code. 1To insert a matlab plot into Word (or LATEX) use File/Save-As in matlab and choose a format like JPG (or EPS for LATEX) and then insert the graphic into a document accordingly.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved