How do I estimate STDEVP for values in multiple fields

B

Bob

I have numeric values in 10 separate fields in one table. I want to calculate
standard deviation (stdevp) for the values. How do I wite the expression?

Bob
 
S

S.Clark

Transform the columns into row, and you won't need to write an expression.
You can use a crosstab query to Uncrosstab the data.
 
J

James A. Fortune

Bob said:
I have numeric values in 10 separate fields in one table. I want to calculate
standard deviation (stdevp) for the values. How do I wite the expression?

Bob

First check to make sure your table is properly normalized. If it is,
or if it isn't and you can't do anything about it then perhaps:

http://groups.google.com/group/comp.databases.ms-access/msg/13092869c02339dd

using StdevP instead of Max?

Two Query Example:

tblA
ID AutoNumber
Value1 Double
Value2 Double
Value3 Double
ID Fld1 Fld2 Fld3
1 3.1 5.2 7.3
2 4.7 7.4 9.3

qryASingleColumn:
SELECT ID, tblA.Value1 AS theField FROM tblA UNION SELECT ID,
tblA.Value2 AS theField FROM tblA UNION SELECT ID, tblA.Value3 AS
theField FROM tblA;

!qryASingleColumn:
ID theField
1 3.1
1 5.2
1 7.3
2 4.7
2 7.4
2 9.3

qryGetStdevP:
SELECT ID, StdevP(theField) AS StdevP FROM qryASingleColumn GROUP BY ID;

!qryGetStdevP:
ID StdevP
1 1.71464281995
2 1.8873850222

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top