I sent this to Siri Bjoner so I dont know if that is allowed or even if it went through.

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%.
  

This is the question I had and I posted it as soon as I started working on it myself. so this is what I have and now I am asking if this is right or wrong, I am not asking for you to solve this for me without me doing any work.

# We first simulate 1000 observations .....

x<-rt(1000,3)
mean(x,trim=0.05) #or 0.1 I am not sure
z<-sort(x)
#next use either
y<-z[-c(1:50,951:1000)] # We want the bottom 5% and top 5% so this corresponds to the elements that we are taking away.
#or
#y<-z[-c(1:100,901:1000)]
mean(y)

Thank you and I hope you understand now 
	[[alternative HTML version deleted]]

