Question 3, part a reads "if x < pi/2 or x > pi/2"
Should the problem in read "if x < - pi/2 or x > pi/2" or do we only need to
evaluate exactly where x=pi/2 and all else?
Joe
Dear Jenn,
please find my solutions for task 1. I still have no access to the dropbox, but already got my HUID number.
I supppose you are 5 to 6 hours behind in Boston. Thus 10 pm MEZ should be 5 pm your time.
Regards and best wishes from Germany-
Joerg
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
Classmates,
I am trying to avoid over-using the list, but I am not working with
anyone and I don't know people who know this stuff, so this is the
only form of collaboration available to me. I am working on problem
2, and I'm struggling with how to vary the sample size appropriately.
Here is what I've been doing:
sims <- 100000
alldays <- seq(1, 365, 1)
for (i in 1:sims){
room <- sample(alldays, sample(20:100), replace=TRUE)
size <- length(room)
same <- x[duplicated(room)]
3same <- length(same) - length(unique(same))
}
I am getting syntax errors, but you can see the logic of what I'm
trying to do--I'm drawing random samples of random size and then
storing the length and the number of samples with three or more same
birthdays in vectors so that I can calculate the probabilities for
each sample size. This is my third or fourth approach, but I am
having difficulty getting the syntax to implement my ideas. I thought
of indexing the room size so that it increased by 1 with each new
simulation, but I could not figure out how to make that happen in
terms of syntax.
Is there a less cumbersome approach that I am missing?
Thanks,
Keith
---------- Forwarded message ----------
Date: Thu, 21 Feb 2008 16:15:26 -0500
From: textbooks <textbooks at thecoop.com>
To: Gary King <king at harvard.edu>
Cc: Jens Hainmueller <jhainmueller at gmail.com>,
Jenn Larson <jmlarson at fas.harvard.edu>
Subject: Harvard Coop: Important Information Regarding Your Spring 2008 Textbook
Order
Dear Prof. King:
We are writing to follow up on our message of 2/15/08. We want to let you
know that copies of Unifying Political Methodology have arrived. We will
contact any students who submitted reserve request reorders, but we would
appreciate your making an announcement to your classes.
If you have any questions or problems, please feel free to contact us at
(617) 499-2223.
Sincerely,
David R. Boyd for Bob Wuesthoff, Textbook Manager
Harvard Cooperative Society
Silly technical question--I know Emacs for Windows exists, but I haven't
found a way to install ESS so that I can use it to run R. If you've done
this, know the link, or can give me suggestions, would you mind sending me a
private email to help out?
Thanks,
John
Dear Nora.
actually I want to write something about projects and project finance.
Are you interested?
----- Urspr?ngliche Mail ----
Von: Nora Richardson <nrichard at fas.harvard.edu>
An: gov2001-l at lists.fas.harvard.edu
Gesendet: Mittwoch, den 20. Februar 2008, 08:54:23 Uhr
Betreff: Re: [gov2001-l] Uh, I guess I am the last kid to get picked again.....
Guten
abendt
Joerg.
Du
bist?
Mein
namen
ist
Nora
und
ich
aus
von
Neuseeland.
Ich
suche
eine
Verfasser.
Interessieren
Sie
sich
fur
Borsenbericht
und
Borsenzettel?
Das
Subjekt
ich
mochte
Forschung.
Interessie?
ps.
meine
Deustch
ist
sehr
schlecht.
Wir
sprechen
sie
Englisch,
ja?
Danke.
bis
bald.
Nora
--
"O
King
Alexander,
each
man
possesses
just
so
much
of
the
earth
as
this
on
which
we
stand;
and
you
being
a
man
like
other
men,
save
that
you
are
full
of
activity
and
relentless,
are
roaming
over
all
this
earth
far
from
your
home,
troubled
yourself,
and
troubling
others.
But
not
so
long
hence
you
will
die,
and
will
possess
just
so
much
of
the
earth
as
suffices
for
your
burial."
--
Translation
Indian
wise
men
Quoting
Joerg
Orgeldinger
<orgeldi at yahoo.de>:
>
>
Dear
colleague.
>
>
>
>
I
am
external
from
Germany
and
looking
for
a
partner,
I
definetely
want
to
>
write
a
project
in
finance
with
Monte
Carlo
simulations.
>
>
>
>
Regards
>
>
Joerg
>
>
>
>
>
Heute
schon
einen
Blick
in
die
Zukunft
von
E-Mails
wagen?
Versuchen
>
Sie??s
mit
dem
neuen
Yahoo!
Mail.
www.yahoo.de/mail
_______________________________________________
gov2001-l
mailing
list
gov2001-l at lists.fas.harvard.eduhttp://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie?s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
On question 2a, do we want to know the if the same birthday occurs
three or more times, or if thee or more people share a birthday with
at least one other person? In other words, does "(length(unique
(room)) < people - 1) contain the information that we need to know?
Thanks,
Keith
Can anyone help?
I'm trying to generate the inverse of a matrix but when I use ginv I
get an error message:
> matinv<-ginv(mat)
Error: could not find function "ginv"
Am I doing something stupid?
Jeremy
Dr Jeremy Hodgen
Senior Lecturer in Mathematics Education
King's College London
Department of Education and Professional Studies
Franklin-Wilkins Building
Waterloo Bridge Wing
150 Stamford Street
London SE1 9NH
Tel: 020 7848 3102
Fax: 020 7848 3182
E-mail: jeremy.hodgen at kcl.ac.uk
Dear all,
I am trying to write my OLS function and I am running into a problem. It'd
be great if you could take a look at what I am doing and let me know where I
am making a mistake.
The problem I get is the following: when I try to matrix-multiply
x_transpose with x, I get the error message: "*Error in x_trans %*% x :
requires numeric matrix/vector arguments"*
Now, examining my x, using str(), I get the following info:
'data.frame': 1000 obs. of 3 variables:
$ x1: num 1.171 1.419 -0.219 -0.907 1.212 ...
$ x2: num 4.68 3.08 2.14 2.22 2.62 ...
$ x3: num 12.8 46.5 13.5 47.0 53.1 ...
Examining my x_transpose, I get the following info:
num [1:3, 1:1000] 1.17 4.68 12.84 1.42 3.08 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:3] "x1" "x2" "x3"
..$ : NULL
By inspection, x_transpose contains all numbers.
To be sure, I also transposed x, using the following for loop:
x_trans <- matrix(NA, nrow = ncol(x), ncol = nrow(x))
for(i in 1:ncol(x)){
for(j in 1:nrow(x)){
x_trans[i,j] <- x[j,i]
}
}
Examining the result of this with str(), I get the following info:
num [1:3, 1:1000] 1.17 4.68 12.84 1.42 3.08 ...
Again, I get the same error message when attempting matrix multiplication.
It would be great if someone could let me know what I am doing wrong as I
have been stuck on this problem for the past couple of hours and simply
can't figure it out.
Thanks a lot.
-Tim
Dear colleague.
I am external from Germany and looking for a partner, I definetely want to write a project in finance with Monte Carlo simulations.
Regards
Joerg
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie?s mit dem neuen Yahoo! Mail. www.yahoo.de/mail