statistics

Accounting for leap year in comparing year to year sales.

I am writing a program that shows the current years sales from the beginning of the fiscal year to the current date, compared to the same date range of the year before. My question is, what efforts do I need to take for leap year? UPDATE: OK they want it like I said (compare last year up to same date) but if today is non leap year an...

What is the best way to diagnose and profile MySQL in live production server?

What tools/methods do you recommend to diagnose and profile MySQL in live production server? My goal to test alternative ways of scaling up the system and see their influence on read/write timing, memory, CPU load, disk access etc. and to find bottlenecks. ...

any functions available in java or related libraries for generating random data in normal distribution

i want to generate normally distributed random data matrices. Are there any java or related functions available for implementing this. ...

c library for computing mean, median, mode, other statistics?

Are there any c (or c++) libraries out there that can take an array of numbers and do basic statistical analysis on it (mean, median, mode, whatever else might be interesting)? ...

How to expose HTTP return (error) codes with JMX?

We would like to monitor HTTP error codes (e.g. per minute) for later graphing. How can we expose HTTP return (error) codes with JMX? Are there code samples or have you done something like that? Is this contained in Tomcat per default? About the implementation: Should the code increase a JMX counter and set it to 0 every minute? Th...

Summarise unlimited sequence using constant storage

Assume we're frequently sampling a particular value and want to keep statistics on the samples. The simplest approach is to store every sample so we can calculate whatever stats we want, but this requires unbounded storage. Using a constant amount of storage, we can keep track of some stats like minimum and maximum values. What else can ...

Cumulative Plot with Given X-Axis in R

Dear all, I have data that looks like this. In which I want to plot accumulative value of dat1 with respect to x-axis. Also plot it together with dat2. #x-axis dat1 dat2 -10 0.0140149 0.0140146 -9 0.00890835 0.00891768 -8 0.00672276 0.00672488 -7 0.00876399 0.00879401 -6 0.00806...

best language or program for finding patterns and statistical analysis?

I have a program that downloads basic historical stock data from yahoo and puts it into an SQLite database. I'd like to be able to perform queries such as finding the moving average, and determining the longest period where a stock has either continued to go up or down. I could write perl functions to do this but this seems like overkill...

Combining joint probabilities

Hello, I am trying to work out the expression for a probability distribution (related to bioinformatics), and am having trouble combining the information about a random variable from two different sources. Essentially, here is the scenario: There are 3 discrete random variables X, A & B. X depends on A and B. A and B are related only th...

Fast sampling and update of weighted items (data structure like red-black trees?)

What is the appropriate data structure for this task? I have a set of N items. N is large. Each item has a positive weight value associated with it. I would like to do the following, quickly: inner loop: Sample an item, according it its weight. [process...] Update the weight of K items, where K << N. When I say sample ...

Determining an 'active' user count of an ASP.NET site

On an ASP.NET site, what are some techniques that could be used to track how many users are logged in to the site at any given point in time? So for example, I could produce a report showing something like this: 10:00am 11:00am 12:00pm 1:00pm 2:00pm .... 3/25 25 32 45 40 37 3/26 31 38 ...

Realistic time estimates for progress bars etc.

I know I am not the only one who does not like progress bars or time estimates which give unrealistic estimates in software. Best examples are installers which jump from 0% to 90% in 10 seconds and then take an hour to complete the final 10%. Most of the time programmers just estimate the steps to complete a task and then display curren...

Java-based monitoring application

Hello,all. Imagine the next architecture: We have Java application over Spring framework (let's call it Manager). It accepts requests and can launch other applications to handle them (let's call them Containers). These Containers exists for a long time. They has rather complex structure and consist of several different applications, ...

Where to find an implementation of Modern Portfolio Statistics in Java or Oracle (eg sharpe ratio, sortinto ratio etc)

I require an a java component or oracle package that implements all of the formulas in "Modern Portfolio Theory". (They do not need to be open source, they can be commerical components.) My searching has yet to find anything suitable. Any help on this would be greatly appreciated, I would like to buy a component to do this rather than ...

Using google analytics to track multiple companies in a single website

I've been tasked with implementing Google Analytics inside our (ASP.NET) application. Here is the scenario: A single web-site on one domain Multiple companies all use this single website Statistics need to be collected on a per company basis as well as the whole Report access needs to be allocated on a per company basis or for all (Wou...

Distribution statistics for .net 3.5 Framework

I would like to know on how many end user pc's the .net 3.5 Framework is currently installed (in percent of course). So is there any reliable data source out there? Thanks! Chad ...

redirect user, then log his visit using php and mysql

I have a PHP redirect page to track clicks on links. Basically it does: - get url from $_GET - connect to database - create row for url, or update with 1 hit if it exists - redirect browser to url using Location: header I was wondering if it's possible to send the redirect to the client first, so it can get on with it's job, and t...

How many SLOCs are you managing in your current work?

Right now I'm directly responsible for around 120k of Java code, about 3/5 is written using GWT. I can trace any functionality to a source file in less than 1min/30 secs. I have 3 years of professional experience and an academic degree. I was wondering what is the average of SLOCs that an average developer is directly responsible for (I...

Generate exponential distribution of bucket sizes

Given a series of incoming items, I want to assign each one to a bucket as it comes in. The bucket can either be a new one (one that has never been used before, of which there are an infinite supply) or it can be an existing bucket. If I look at the number of buckets with one item, the number with two, the number with three, etc., I want...

What are some ways to have fun with a large amount of data? (ie, the Twitter, del.icio.us etc. APIs)

Twitter, Google, Amazon, del.icio.us etc. all give you a lot of data to play with, all for free. There's also a lot of textual data available through initiatives like Project Gutenberg. And that, it seems, is just the tip of the iceberg. I have been wondering how you could use this data for fun. I'm a first year IT student, so I have no...