Creating 95% Confidence Interval (Mean +or- 1.96*Standard Deviation)
2 September, 2013
I am attempting to build a 95% Confidence Interval however am having no luck. To build this I need to take the Mean (Average) of the data-set, and then add/subtract 1.96 multiplied by the Standard Deviation. When I attempt to build this using Freehand SQL I get a warning that states that the Group Function is Incorrect.
I have therefore attempted to build this using a Sub-Query; building the advanced functions for Standard Deviation and Mean in the Sub-Query, then using the Calculated Field functionality to create a Calculated Field for both the Upper Limit (Mean + 1.96*Standard Deviation) and the Lower Limit (Mean - 1.96*Standard Deviation) to create my 95% Confidence Interval. However, when I use the Mean and Standard Deviation fields from my Sub-Query (which were created using the Advance Statistical Functions), the fields are no longer the advance functions I created, but revert back to being a count.
What do I need to do to create a Confidence Interval? All I really require is a calculated field that has the Mean (Average) plus or minus 1.96 multiplied by the Standard Deviation.
Regards,
Sam
I have therefore attempted to build this using a Sub-Query; building the advanced functions for Standard Deviation and Mean in the Sub-Query, then using the Calculated Field functionality to create a Calculated Field for both the Upper Limit (Mean + 1.96*Standard Deviation) and the Lower Limit (Mean - 1.96*Standard Deviation) to create my 95% Confidence Interval. However, when I use the Mean and Standard Deviation fields from my Sub-Query (which were created using the Advance Statistical Functions), the fields are no longer the advance functions I created, but revert back to being a count.
What do I need to do to create a Confidence Interval? All I really require is a calculated field that has the Mean (Average) plus or minus 1.96 multiplied by the Standard Deviation.
Regards,
Sam
Hi Sam,
there is more than one way to tackle this report, my personal preference would be to create 2 Custom Functions for the Mean and the Standard Deviation. (N.B. this way assumes you are using YF 6.3)
That way both of those Custom Functions would be available to you in a Calculated Field (by changing the Formula Type to Pre-Defined Formula) so you could then create a Calculated Field for the Mean and one for the SD.
Then having created those 2 Calculated Fields you will find them both available to you when you create your 3rd & 4th Calculated Fields for the Upper & Lower Limits.
I'll be interested to hear how you go with that, please let us know, and of course if there are any questions or issues please don't hesitate to contact us.
Regards,
Dave
there is more than one way to tackle this report, my personal preference would be to create 2 Custom Functions for the Mean and the Standard Deviation. (N.B. this way assumes you are using YF 6.3)
That way both of those Custom Functions would be available to you in a Calculated Field (by changing the Formula Type to Pre-Defined Formula) so you could then create a Calculated Field for the Mean and one for the SD.
Then having created those 2 Calculated Fields you will find them both available to you when you create your 3rd & 4th Calculated Fields for the Upper & Lower Limits.
I'll be interested to hear how you go with that, please let us know, and of course if there are any questions or issues please don't hesitate to contact us.
Regards,
Dave
Creating Custom functions is too advanced for me; doubt I'll be able to come up with a solution. Thanks anyway