Solved

DStDev

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

757 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

19 Experts available now in Live!

Get 1:1 Help Now