Data Science with Java – Part 4 : Testing Hypothesis with the inference package

To test if a certain hypothesis is likely to be true we can take advantage of the Apache commons math inference package. Considering the tests included in the package is a good opportunity to learn more about statistics and probability theory. Let´s consider the following binomial test about flipping a coin:   The result that […]

Data Science with Java – Part 2: CSV data into charts

A nice java library called opencsv allows you to import the csv file content and make charts out of it. Let´s consider for example unemployment in Germany since the reunification. We will use a csv file containing year, amount of people in germany, west and east (four columns) 1991,2602203,1596457,1005745 1992,2978570,1699273,1279297 1993,3419141,2149465,1269676 1994,3698057,2426276,1271781 1995,3611921,2427083,1184838 1996,3965064,2646442,1318622 1997,4384456,2870021,1514435 […]

Python : Basic statistics with the numpy module

The numpy module features some useful functions for statistics, like “mean()” and “median()”: For example let´s consider a 2D array with age and height of some people and print out some statistics: The code can be also found on github:

Java Call Center example: threads synchronization with Semaphore and CyclicBarrier

To learn about Java threads and concurrency I have decided to represent a Call Center. The customers making the phone calls to a call center can be represented as threads. To simulate the real world scenario I will use Semaphores and a Cyclic Barrier to simulate the standby situation. It´s a simple Producer/Consumer scenario. The […]