Hi everyone,
I posted some useful handouts from a probability class to my FAS space. The
documents "Distributions" and "Sums of Independent RVs" are particularly
helpful.
John
I've implemented the method of bisection using three embedded "while"
loops. My problem is that, when I call for the function, it runs
forever even though I have specified a maximum number of iterations.
It has been running long enough that I suspect it is going to run it
an infinite number of times.
Without revealing my code for the whole problem, I'll show enough
code demonstrate how I am telling it to stop after k iterations.
while(fx(((x+y)/2)) != tol && i < iter.max){
i = i+1
while(){
while(){
}
}
}
So, my first theory was that the other two loops were running
infinitely (or a lot of times) within each iteration of the first
while loop. However, I added "&& i < iter.max" to the end of the
other while loops and this did not help. Other theories?
Don't think this has come up on the list yet, but you can have LaTeX number
your subsections using "A,B,C" rather than "1,2,3" (in the same way as in
the problem set), using
\def\thesubsection {\alph{subsection}}
in the preamble.
More information:
http://help-csli.stanford.edu/tex/latex-sections.shtml
Ari
Hi all,
I am writing up answers to q1 and trying to insert the graphs of the functions into LaTeX. The graphs are saved as a pdf file and has two pages. When I use \includegraphics{fig1.pdf}, LaTeX only compiles the first page. Any suggestions to fix it? Thanks.
quan
Hi Jen[n,s],
I want to treat the partials in 3c parametrically (with an analytical
justification for doing so) to make the problem a univariate case of
Newton's method. Is this fair game?
Thanks,
John
No, Latex is not required. We encourage you to use it, but you don't have
to. On the website we have put together a lot of info about Latex. Another
hybrid alternative you may want to try is LyX ( http://www.lyx.org/ ) .
Hope this helps.
Jens
From: Joerg Orgeldinger [mailto:orgeldi at yahoo.de]
Sent: Thursday, February 28, 2008 7:57 AM
To: jhainmueller at gmail.com
Subject: Latex
Dear Jens,
is it required to use LaTEX. I did not use it before, so I have to learn it
first.
Regards
Joerg
________________________________________
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs mit Yahoo! Go.
For the multivariate optim() function, I am having trouble figuring
out why I am getting the following error message:
optim(par = sval , fn = fkt3...
"Error in fn(par, ...) : argument "y" is missing, with no default"
I do not believe it is a problem in how the f(x) was written, because
I can evaluate fkt3 at some values for x and y. A problem arises when
I try to put it into some function like optim() where I do not
specify some particular x and y.
Out of curiosity, how did you produce the piecewise function in
problem 2 in LaTeX? I thought \begin{cases} was used, but it doesn't
want to recognize that command.
Hi 2001,
Solutions to problem set 1 are posted to the course website. We'll hand
back your hardcopies in section on Thursday, and for this problem set I'll
email a brief note and grade to those of you who submitted the entire
problem set electronically.
A couple of notes:
Please use the solutions on the website as a guide for future problem sets.
In particular, note how there are two files, one with R code (run-able; it's
a file we can open and run as-is in R) and one with solutions and
explanations. Submitting a separate R file is important so we can easily
run your code and see where things went awry (or well, of course).
If you use R to calculate something (such as a probability), include the
actual value that R estimates in your write-up; don't just include the code
without its output.
Many of you had clever approaches to the birthday problem- good work. In
the solutions we show two ways of estimating the room sizes in problem 2.
Even if you generated all correct answers, take a look at the solution
code. All of you can benefit from making your code more efficient.
Common mistakes on this problem set include 1d, 2a, 2b and 3d. In 1d, a
common error resulted from forgetting which gender corresponded to 1's and
which to 0's. In both parts of problem 2, a common difficulty was figuring
out how to find triplicate birthdays without counting two pairs of
birthdays. (We discuss this problem in the R file to the solutions).
Another mistake on 2 involved testing a few room sizes without resetting the
counter for 'samedays' so the estimate for the number of required people was
too low. In 3d, some struggled with drawing simulated datasets- you can
review the solutions and also the R code from section 2 for a slick way to
sample from a dataset.
And finally, don't worry if your solutions were not exactly those posted on
the solutions- these are all simulated estimates, so some variance is
expected and perfectly fine.
One problem set down...
Jenn