Solved

DStDev

Posted on 2004-08-15
5
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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