# Tagged Questions

1answer
25 views

### How to compute conditional expectation of a log function

I've been studying the Expectation Maximization algorithm. According to the formula shown here, what I have to do in the M step is to compute a new $\theta$ that maximizes the conditional expectation ...
0answers
23 views

### Little hardcore: Do you know any parallel modified moving average algorithm?

Do you know any parallel modified moving average algorithm? I want quickly calculate moving average but not with sequential algorithms. I want to use parallel algorithms but I have still not found ...
1answer
106 views

### Quicksort analysis problem

This is a problem from a probability textbook, not a CS one, if you are curious. Since I'm too lazy to retype the $\LaTeX$ I will post an ugly stitched screenshot: This seems ridiculously hard to ...
1answer
60 views

### Simple random sample without replacement

I have a data file from which I wish to create a uniformly distributed simple random sample, without replacement. Will the following algorithm give me an unbiased result? ...
0answers
27 views

### Likely related elements

I have lists of pair like so : KHLM1800, (a,b,c) KHLM1900, (a,b,d) KHLM1840, (a,b,c,d) KHLM1845, (a,b,c) TCMB9001, (a,c) . . . Naively it looks like KHLM ...
0answers
31 views

### Statistical significance test in polygaussian fitting, using Levenberg-Marquardt

I have a set of dihedral angle values that I have fitted using a polygaussian function via the Levenberg-Marquardt algorithm http://en.wikipedia.org/wiki/Levenberg-Marquardt. Specifically, the ...
0answers
36 views

### How to measure the streakedness of numerical data?

Would anyone know how to use C/C++ to calculate the streakedness of data? The definition of streakedness is how many deviations away from the mean(i.e running average a numerical data streak. Thank ...
0answers
23 views

### Relative weight ratio

I'm trying to create a sort of point system for a simulation but I'm stuck on how to calculate relative "power" of entity in the system. Let's say there's three (E)ntities in the system. E1 has ...
0answers
69 views

### Problems with Percentage Change for Trending data [closed]

Firstly, I have a very minimal understanding of any high level mathematics but I'm hoping this has an fairly basic answer. I searched other questions before posting this and didn't find anything ...
0answers
48 views

### Effective model for calculating momentum or growth rate for a time series

I have a series of numbers tracking the performance of an entity on any given day. It's nothing but a simple integer for each date. For example, here's a series for Entity "X" ...
1answer
61 views

### 1/f “Pink Noise” for the Math-Disabled

I have very little skill when it comes to math beyond all the elementary level operations (addition, subtraction, multiplication, division, mean, mode, etc) and a vague grasp of statistics, what a ...
2answers
43 views

### Find factor of sample elements given the median

I have a sample $S(x)$ containing $n$ elements: $$S(x)=\{ s_1 x, s_2 x, \ldots, s_n x \},\qquad s_i \in \mathbb{R}, x\in \mathbb{R^{+}}$$ Every element in the sample is multiplied by $x$. Now ...
2answers
86 views

### Statistic: calculating error of order of two sequences of objects

I am trying to derive a meaningful statistic from a survey where I have asked the person taking the survey to put objects in a certain order. The order the person puts the objects is compared to a ...
1answer
137 views

### Html Tag counting - Rate of Change formula

I've been trying to a find a statistics-esque formula for calculating the rate of change for html tags which are either added or removed from various websites. So, for example, with the scraper I'm ...
1answer
262 views

### Calculating Percentile Rank Using Relative Strength Ranking

I have a spreadsheet of stock quotes that contains Relative Strength Ranking (RSR) ranging from -45 to 65 and the count of ranks is 1500. Could someone please explain how I can calculate percentile ...
0answers
144 views

### Combine dependent variables into index that best matches independent variable?

I'm an undergrad working in a geochemistry lab for the summer. My job requires a good amount of statistical analysis, something that I'm not very familiar with. I'm looking for an way to blindly ...
1answer
50 views

### Finding an accurate rating between 1 and 10 based on numerous data points

I'm going to provide a fictitious setup that aligns with my mathematical needs. I am a company that is measuring the bounciness of balls and providing two 1-10 rating to each ball based on how it ...
1answer
227 views

### How to transform normally distributed random sequence N(0,1) to uniformly distributed U(0,1)?

Everybody knows how to convert U(0,1) to N(0,1). However does anybody know an efficient algorithm solving the opposite task? I mean how to generate U(0,1) sequence from N(0,1) one? Asking because a ...
1answer
87 views

### Ranking System and Separated Populations

I'm trying to modify the ELO ranking system formulas to adapt them to eSport (electronic sports, but more specifically Starcraft II). (The reason I'm using ELO, is the straight forward concept and ...
2answers
107 views

### Working out the “best” score based on quantity and ratio

I'm not an expert with mathematics so I hope I'm posting in the right place! I've got a lot of products which can be rated good, bad and OK by a user. What I'm having trouble with is finding which is ...
0answers
51 views

### Trying to create an algorithm that takes into account multiple variables

I've hit a road block on how I can put what I have into a calculation that works. Simply I am trying to work out the "value" of each company that we have on my companies books. The information I want ...
0answers
107 views

### MDS and low distortion embeddings

While googling about low distortion embeddings, I feel that there are two separate communities working on the subject of low distortion embedding, without much communication with each other. In ...
2answers
66 views

### How can we find a new sum of multiplications based on a previous one?

Suppose wehave two sequences: $$(a_0, a_1, a_2, \dots, a_{2^n-1})$$ $$(b_0, b_1, b_2, \dots, b_{2^n-1})$$ We also have the following sum: $$\sum_{k=0}^{2^n-1}{a_k \cdot b_k}$$ I'd like to know the ...
0answers
61 views

### Algorithm to predict next 3D points

For example, having this data: year x/y/z 2007 10/20/70 2008 20/10/70 2009 30/10/60 2010 40/10/50 2011 40/15/45 We want to predict what will be the x/y/z in ...
1answer
32 views

### Prediction based on different factors

I have a problem bugging me for some time. I am developing a game and need to calculate the percentage of the capacity of a stadium that will be filled in relation with some factors: other team ...
1answer
189 views

### Tuning the birthday paradox

I have limited access to a collection $X_1,\ldots,X_m$ of sets of positive integers. Each $X_i$ is "moderately large" (a brief survey has found them to contain about $10^6$ elements in each set), but ...
2answers
273 views

### Design an $O(n)$ deterministic algorithm to find the approximate median of an array

We have an unordered sequence $A$ which consists of $n$ different numbers $A[1],A[2],A[3],\dots, A[n]$. One member of $A$ is named an approximate median if $A$ contains at least $n/4$ members ...
1answer
137 views

### How does the backward/forward algorithm work if there is no end?

I'm using Jason Eisner's spreadsheet to understand HMM more better. There's a box at the top that have a transition matrix. I see the Cold day and Hot day options, but don't understand why there's a ...
0answers
92 views

### Unbiased (random?) selection algorithm

Let say we have the following set $S = \{x_1, x_2, x_3, ..., x_n\}$ where $x_i$ is a real number between $0$ and $1$. Now I want to find an algorithm that randomly generates a subset of $S$, free to ...
1answer
316 views

### Boxcar Recursive Method for Finding Standard Deviation

I'm trying to develop a real time algorithm for finding level areas of an electrical signal. To do so I need to find the variance for a particular rolling time interval. From John Cook's blog and ...
0answers
69 views

### First hitting time for generalized Pólya urn

I have looked around the literature but I've not found a clean answer to the following. Imagine that you have a generalized Pólya urn (GPU) in the sense of Pemantle's survey (Section 2.1 in ...
2answers
172 views

### Velocity Measurement Error Estimate

I have 2 position estimates (along with their measurement error) and a difference in time between estimates. I estimate velocity using ...
0answers
145 views

### calculate the rate of change

I am trying to calculate the change frequency for a set of data. Each bit of data has the date-time it was created. I would like to say for a specific set of data the change frequency is hourly, ...
2answers
139 views

### Formula to generate a score from 1 to 100 based on 2 percentages?

I am trying to come up with a formula that will result in a score of 1 to 100 (never anything lower or higher). I have two numbers that I can use to come up with this score, a specific percent and an ...
2answers
398 views

### Buckets of Balls, Will one fill if I add another Ball?

I was refereed here by stackoverflow.com. With some searching I found this: another balls and bins question, but its not quite what I am looking for. Rather the inverse. IE the expected number of ...
2answers
200 views

### The Metropolis Algorithm

I Know how to apply the Metropolis Algorithm, but I'd be grateful if someone could explain to me the reasoning behind the steps in the algorithm. I've tried in vain looking for the original paper. ...
0answers
202 views

### Does this calculation have a name, or a generic formulation?

Background I would appreciate help in identifying / explaining this operation: To calculate each of the $n$ values of $f(\Phi)$: sample from the distribution of each of $i$ parameters, $\phi_i$ ...
2answers
704 views

### Calculate variance from a stream of sample values

I'd like to calculate a standard deviation for a very large (but known) number of sample values, with the highest accuracy possible. The number of samples is larger than can be efficiently stored in ...
1answer
78 views

### Spread evenly $x$ black balls among a total of $2^n$ balls

Suppose you want to line up $2^n$ balls of which $x$ are black the rest are white. Find a general method to do this so that the black balls are as dispersed as possible, assuming that the pattern ...
0answers
65 views

### What is the optimal investing solution for the given simulated market?

I have come across an artificial, simulated, stock-market type of situation, whose rules, I find, create a rather interesting problem. I want to know if there is a mathematically optimal solution for ...
1answer
363 views

### Consequences of choice of a seed for random number generating algorithm?

Background I am trying to do a reproducible scientific analysis. My conclusions are not dependent on the random number generator, but the RNG does change the results ~1% between runs. I would like to ...
2answers
3k views

### How do you calculate percentile?

Say I have the following numbers: 10 10 9 5 4 4 4 1 How do i go about calculating the percentile for each score? Is there a standard formula for figuring this ...
1answer
331 views

### Simple algorithm effectiveness (Least-Squares Regression Line in Terms of Sample Variances)

I hope I'm at right place, as I asked this question at stackoverflow.com where the question was closed and suggested I go ask here. I'll try to be more comprehensive also, looking at couple of replies ...
1answer
929 views

### easy to implement method to fit a power function (regression)

I want to fit to a dataset a power function ($y=Ax^B$). What is the best and easiest method to do this. I need the $A$ and $B$ parameters too. I'm using in general financial data in my project, which ...
3answers
1k views

### How to accurately calculate erf(x) with a computer?

I am looking for an accurate algorithm to calculate the error function. I have tried using this formula (Handbook of Mathematical Functions, formula 7.1.26), but the results are not accurate enough ...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 31, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9248607158660889, "perplexity_flag": "middle"}