×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Mean and Std deviation on a varying data set in an Access form.

Mean and Std deviation on a varying data set in an Access form.

Mean and Std deviation on a varying data set in an Access form.

(OP)
thread702-1136748: Calculate Standard Deviation in Form Send Value to Table

Like the above thread I need to get a std deviataion of a data set on a form.
However, my issue is that my data set could be between 3 and 10 of the circled items.
The remaining 7, 6, 5, 4 fields could be blank.
How do I write this in the macro so it does't throw an error?

The calcs for each of the data sets are;
Av Density (this ones obvious)
Characteristic Voids CV= Avg x + (k*stddev x)
Characteristic Density Ratio CV= Avg x - (k*stddev x)

Have attached a pic to show the common data sets.

Any help on this would be appreciated.
I've had a lot of fun with Access over the years, but this one is getting me.

RE: Mean and Std deviation on a varying data set in an Access form.

(OP)
Managed to get my code working

I'd like to share how I did this

Be mindful that x was a varying number of fields from 3 to 6.
x was stated as number of samples on my form.
"x = Forms![Density Test]![No of Test]"
So had to be able to calculate from whatever number of fields was required.

'Average Density Ratio
For q = 1 To x
Dat4 = Choose(q, Forms![Density Test]!DR1, Forms![Density Test]!DR2, Forms![Density Test]!DR3, Forms![Density Test]!DR4, Forms![Density Test]!DR5, Forms![Density Test]!DR6)
S4 = S4 + Dat4
Next
Forms![Density Test]!MDR = S4 / x
MDR = S4 / x

'Charact Density Ratio
For t = 1 To x
Dat5 = Choose(t, Forms![Density Test]!DR1, Forms![Density Test]!DR2, Forms![Density Test]!DR3, Forms![Density Test]!DR4, Forms![Density Test]!DR5, Forms![Density Test]!DR6)
S5 = S5 + (Dat5 - MDR) ^ 2
Next
DRSD = Sqr(S5 / (x - 1))
Forms![Density Test]!CDR = MDR - (Forms![Density Test]!K * DRSD)

K is a factor of risk applied to the std dev. THe base calc is Characteristic DR = Av DR-(0.92*stddev of DR)
The density ratios are across 6 different fields in a table and on a form.

Thanks for the help here on this site.
Really appreciated!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close