Improved Statistics for Delphi by adding Null support

ESBPCS for VCL has quite a few Statistical Routines and Components – basically aimed to cover what you would do in a First Year University Course (for many years I taught 1st Year Stats to Bachelor of Commerce and MBA students, so it covered all we did in that). Our ESBStats was based on these routines.

One of the things that was on our “to do” list was to be able to better handle “null” data – for example you collect the heights (and other data) of 30 people but 3 leave the entry for height blank. If you enter 0 then that throws the Average (and many other Stats) off. You can of course ignore 0’s but then you hit problems when 0 is a valid entry, etc.

As discussed in earlier posts, we have introduced Nullable Types to ESBDevLib for VCL/FMX and so rather than just having routines for array of Double, we can also have routines for array of NullableDouble and add the necessary processing to handle the Nulls.

Whilst we are continuing to offer routines for Dynamic Arrays, we realise that many developers are storing Numeric Data in Generic TLists – so we are offering versions of the Stats that also work with TList <Double> and TList <NullableDouble>.

As in other areas of ESBDevLib, we are also offering Class approaches – so TEDLDescStats is a Class that has an internal list of values (which can be virtual) that offer the standard descriptive statistics – such as Mean, Median, Mode, Variance, Standard Deviation, Skew, Kurtosis, etc.

So currently we are testing the Descriptive Statistics for Single Data List and then on to adding classes to handle Grouped Data, Paired Data, Hypothesis Analysis, Linear Regression, etc.

About esbglenn

Software Developer working at our Family owned business, ESB Consultancy, which is located in Kalgoorlie-Boulder, in the Eastern Goldfields of Western Australia.
This entry was posted in Beta Development, Math in Delphi and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.