Posts

Showing posts from August, 2023

ANOVA - Comparing averages of multiple data sets

Image
In an earlier post, we used the Two Sample Mean Test to compare the mean of two samples (duh). If you have 3 samples you could use the same test, and compare between pairs of samples, i.e. sample 1 & sample 2, sample 2 & sample 3, and sample 1 & sample 3. The problem arises when you have many more sample sets. Running this test means keeping track of the permutations. This approach is wastefully repetitive and you are likely to make mistakes. Also, sometimes, you only want to know if there is at least one sample that is different from the rest. Scientific or medical break throughs are rare. In most experiments and trials, there will be no change/difference. A single test that tells you that there is no difference between the samples allows you to move on.  Is there a better method to compare the mean of multiple samples? Enter ANOVA Analysis Of Variance (ANOVA) is a statistical method used to compare the means between samples. It tells you if there's any significant d

Python in Excel coming soon! Will you be onboarding?

Image
If you have not heard, Microsoft announced that it will be releasing Python in Excel . Python commands and libraries will be accessible from within Excel. No installation or add-ons required. The various Python libraries including charting capabilities will be available for you. Python commands will be executed in Microsoft Cloud. Security will be ensured. The screenshot below shows Python commands entered from within an Excel cell, with Python referencing data from the worksheet, almost as if Python is native in Excel. Advance visualisation will be available. Machine learning capabilities will at your finger tips. Will it benefit you? Short answer : No. The majority of Excel usage would not need these Python libraries and charts. It will not entice  non-Python users over to Python. Any workbook created with Python scripts would still require a Python user to maintain changes. So in a company, an employee who introduces Python in Excel, would not enjoy the reception. Any workbook creat

When it is not Normal... The Mann-Whitney Test

Image
The Mann-Whitney Test Mann-Whitney test helps you compare two sets of data when they are not normally distributed. I would use Mann-Whitney test only after I confirm using the  Anderson-Darling test . I should add that I run a box-plot first before running the AD test. I used to think that Mann-Whitney compares the medians of two data sets. But in the process of implementing Mann-Whitney in Excel LAMBDA, I found out that Mann-Whitney test compares the mean ranks, in doing so, it determines if the two data set came from the same population. Step 1: Group the two samples together and sort the data in ascending order, but retain their sample origin. Step 2: Rank the combined data. Step 3: Separate the data back into the two samples. Sum the ranks for each sample. Step 4: Compute the test statistics U `U_1 = R_1 - (n_1(n_1+1))/2` and  `U_2 = R_2 - (n_2(n_2+1))/2` Step 5: Choose the small U to calculate the equivalent z-statistics. `z = (U - m_U) / sigma_U` where `m_U` and `sigma_U` are the