Solved

Statistics Questions

Posted on 2002-07-15
10
278 Views
Last Modified: 2010-05-02
Let's say i had a group of numbers and now i know the mean, median, mode, and range for this group how do i calculate the variance?


Now let's say i want to statistically create a new list based off of the information from the first list.
How would i go about doing that?

Basically what i'm looking for is a way to create a new list with the size of the new list to be specified by the user and once created it will have the same statistical distribution with some randomness and variance built into it.

Easy examples would be nice! :>)
0
Comment
Question by:jrcp
10 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7155658
Please maintain this open question:
FTP Append Method Date: 07/02/2001 09:13AM PST  
http://www.experts-exchange.com/visualbasic/Q_20144619.html

Thanks,
Anthony
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7156150
the variance is the sum of the squares of the (item-avg) differences.
0
 

Author Comment

by:jrcp
ID: 7156995
Okay, so how do you use the variance?
0
 
LVL 18

Expert Comment

by:deighton
ID: 7157006
you can calculate the mean and variance of a list fairly easily, i could come up with code for that.

Making the new list depends on the distribution type you are interested in.
0
 

Author Comment

by:jrcp
ID: 7157014
I would be interested in a normal distribution... If i had some code or info on that I could modify it to change the distribution if i needed to. Just a little rusty on the stats.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:jrcp
ID: 7157056
Just to check....

So if my list was

1,2,3,4,5,6
The variance would be
1 + 4 + 9 + 16 + 25 + 36 = 91/6 = 15.1

I guess this seems high since each number is only 1 apart, or it's just because i don't know how you use the variance.
0
 
LVL 45

Accepted Solution

by:
aikimark earned 200 total points
ID: 7157085
You asked me how you could calculate the variance.  What do you mean "How do I use it?"

=======================================
I would try to create your new list similar to the following:
For I=0 to Ubound(itemarray) -2 Step 2
   itemarray(I) = avg + rnd() * (StandardDeviation/N)
   itemarray(I+1) = avg - rnd() * (StandardDeviation/N)
Next

Where StandardDeviation/N is the square root of the variance divided by the number of items in the list.

Note: this assumes that you have an even number of items in your array.  Otherwise, you will have to create a random number = (rnd() * (StandardDeviation/N) * 2) -(StandardDeviation/N)
to be added to each item in the array.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7157113
If your list were:
1,2,3,4,5,6
The average = (1+2+3+4+5+6)/6 = 21/6 = 3.5

The variance would be
(3.5-1)^2 + (3.5-2)^2 + (3.5-3)^2 + (3.5-4)^2 + (3.5-5)^2 + (3.5-6)^2 = 2.5^2 + 1.5^2 + .5^2 + -.5^2 + -1.5^2 + -2.5^2 = 17.5
0
 

Author Comment

by:jrcp
ID: 7157117
What i meant by "how do i use it" is what is the purpose of variance?  I thought that variance would come into play when trying to create a new list with the same properties. It looks like i'm confused on the difference between std dev and variance.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8012496
Hi jrcp,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept aikimark's comment(s) as an answer.

jrcp, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now