For question 2,

TTT <- rt(1000,3)
mean(TTT[rank(TTT) <= 975 & rank(TTT) >25])

On Thu, Jan 27, 2011 at 8:16 AM, Ben Boyadjian <benjy_cy...@hotmail.com>wrote:

> Hello I am trying to solve these problems and I am not allowed to use loops
> or ifs.
>
> 1st Question
> My first question is that I have generated 100 random numbers from the
> uniform distribution then
> A)add only the negative integers.
> B)add elements until the first appearance of a negative element.
>
> I know how to choose the negative elements for A but how to find integers?
> And I dont know what to do for B.
>
> 2nd Question
>  Simulate 1000 observations from the student-t distribution with 3 degrees
> of freedom and then calculate the truncated mean by excluding bottom 5% and
> top 5%.
>
> Thank yoou
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to