Solved

DStDev

Posted on 2004-08-15
5
302 Views
Last Modified: 2008-02-01
Hi all,

I was wondering if there was a way to do this function on the contents of a row vs a column?  For example

Sample  Data1 Data2 Data3...
sample1   1        2       3

What I would like to do is get the DStDev on the fields Data1...Data3 for sample1 only?

Thanks for any help...

0
Comment
Question by:Mithrinder
  • 4
5 Comments
 
LVL 44

Expert Comment

by:GRayL
ID: 11805950
Do it in Excel - not Access. You can do stats on columns in access tables. you cannot do rows. Import your access data into excel and go from there.
0
 

Author Comment

by:Mithrinder
ID: 11927059
Any other Access only solutions?  There must be an easier way to do this in Access I need to do the StDev on the fields many many times and Excel is not a solution.  Maybe read all the samples I need into a temporary 1 column table and then preform the StDev on the field?  Am I missing something simpler here?

0
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 11927208
You could generate a function StdDev in VB code, using a formula of your liking.

Call the code from a query:

Select Fld1, Fld2, Fld3, ..., Fldn, StdDev(Fld1, Fld2, Fld3, ...,Fldn) As SDev From tblData where Sample = 'sample1';

If you did not want to see the individual values only insert the StdDev() function in the select statement. In Fldn, n represents the maximum no of values. If there are variations in the number of elements you want to measure SD, you will have to enter commas to make up n entries and your code will have to deal with nulls properly. This would be fairly straightforward for 25 or so entries, but more than that you are into "tedious" coding. I think it is tedious with even less entries because you're trying to get a silk purse out of the sow's ear!

If the data were stored:
Samples
======
Spl1 Spl2 Spl3
  1      2     5
  3      3     3

     ........

  4     5      4

At least then you could DStDev("Spl3","Samples")

I still say you should do it in Excel. But these are two ways you may want to consider.

0
 
LVL 44

Expert Comment

by:GRayL
ID: 11927231
Sorry, I shouldn't say of your liking, as there is only one way to calculate SD?  -  I mean you have to provide yourself with the formula as even among statiticians, they have their preferred ways of doing stat calcs.
0
 
LVL 44

Expert Comment

by:GRayL
ID: 12005969
Thanks, glad I could help.

Ray
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

863 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

28 Experts available now in Live!

Get 1:1 Help Now