Solved

DStDev

Posted on 2004-08-15
5
311 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

778 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