Skip to content

sample mean, variance and SD

10 messages · parvez_200207, Greg Snow, Berend Hasselman +4 more

#
hi
could you help me to solve this issue

Question:
Using command rweibull(100,8,15), simulate n = 100 realizations from
Weibull(8; 15) distribution. Using the simulated sample, compute the sample
mean, variance and standard deviation of these observations.

I am trying like this

sim<-rweibull(100,8,15) # simulated sample
SM<-mean(sim) # simulated sample mean
var(sim)      # variance
sd(sim)       #SD

Thank you in advance.

Parvez



--
View this message in context: http://r.789695.n4.nabble.com/sample-mean-variance-and-SD-tp4649190.html
Sent from the R help mailing list archive at Nabble.com.
#
On 10-11-2012, at 21:09, Greg Snow wrote:

            
Probably.
I would tend to agree with the last paragraph.


Berend
#
On 10-11-2012, at 19:23, parvez_200207 wrote:

            
What is your actual question?
You have calculated what you were supposed to.

I guessing that the result wasn't what you expected.
I'm not going to give you a ready made answer to a question you didn't ask.
In an R console do

?rweibull 

and read carefully about the shape and scale arguments in the Details section.
That should help you to understand your results.

Berend
#
It is not always easy to discern what the instructor wants a student to get out of an assignment. Therefore, I can't see changing the policy as it stands.

 That said, it is not always easy to discern homework from self-study, and sometimes when the question is well-constructed I don't go out of my way to confirm whether it is homework... the instructor has internet access too.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Greg Snow <538280 at gmail.com> wrote:

            
#
On 11/11/2012 07:09 AM, Greg Snow wrote:
As usual, a thoughtful comment on a problem that does not have a 
straightforward solution. The actual responses to obvious homework 
questions range from curt refusals to worked examples. I don't know the 
official status of the "no homework" policy if there is one.

My responses are guided by their expected utility. If the question 
appears to be asked by someone who has just gotten stuck on an esoteric 
quirk of R (and the extraction operators are a good example), I'll try 
to get them over the hump. In this particular case, parvez_200207 seems 
to have answered the question and not realized it. Maybe this was due to 
something that parvez_200207 didn't even know was going on (e.g. a 
sink() was operating) or maybe it was just complete cluelessness. If I 
strongly suspected the former, I probably would have answered.

Jim
#
On Nov 10, 2012, at 6:58 PM, Jim Lemon wrote:

            
The fourth entry (very close to the top)  in the Posting Guide says:
"<b>Basic statistics and classroom homework:</b> R-help is not intended for these."
That's been my approach as well.  I may simply offer:

?<func-name>

... but if they merely post an obvious homework problem with no effort visible I will either ignore it or point to the Posting Guide. Sometimes a preamble along the lines of "I tried to do this and cannot get academic support because the teacher is using SAS" will be sufficiently convincing.
I wondered whether parvez_200207 wanted to do the same procedure 1000 times and record the summary statistics each time.