generate data with known mean, variance, and sample size???

jswhite

New Member
Joined
Sep 28, 2004
Messages
1
I am writing a computer lab for my Ecology class and want to make up data for them to practice plotting, stats, etc... I was told it is possible to generate data given the target mean, variance (st dev, std error, or CI), and sample size. Any suggestions? Thanks!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Re: generate data with known mean, variance, and sample size

Welcome to the board!
Unfortunatly I dont think its possible using Excel.

There could be several data samples that have the same mean, variance, samplesize and anyother stat. Excel would not be able to determine which sample you want.

It could however give you random data that you could use to calculate those numbers...
 
Upvote 0
Re: generate data with known mean, variance, and sample size

Use Tools | Data Analysis... | Random Number Generator.

That said, you can always generate your own random numbers with the following deceptively simple and absolutely generic method: Function-inverse(Rand())

So, to get 30 random numbers from a normal distribution with mean 10 and standard deviation 2, select 30 cells and array-enter =NORMINV(RAND(),10,2)

The above technique works for *any* continuous distribution. And, if XL supports the inverse function (as it does for F, T, Gamma, Normal, and LogNormal -- to name a few) all you need is the same technique used in the previous paragraph for the normal distribution.

The concept works for discrete functions also, but you have to do a bit extra work to calculate the inverse function value.

Obviously, the results are only as good as reliability and accuracy of the underlying XL functions.

Finally, to array-enter a formula, complete formula entry not with the ENTER key but with the combination CTRL+SHIFT+ENTER keys. If done correctly, XL will display the formula in braces { and }
jswhite said:
I am writing a computer lab for my Ecology class and want to make up data for them to practice plotting, stats, etc... I was told it is possible to generate data given the target mean, variance (st dev, std error, or CI), and sample size. Any suggestions? Thanks!
 
Upvote 0
Dear Mr tusharm
thanks for your excellent solution,
but would you explain step by step how can i do this solution please
 
Upvote 0

Forum statistics

Threads
1,225,804
Messages
6,187,111
Members
453,408
Latest member
Valsauvage

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top