# Questions tagged [statistics]

The tag has no usage guidance.

152 questions
Filter by
Sorted by
Tagged with
49 views

### Information content of a real number

Suppose I have a sequence of 5 IID Bernoulli variables, with probability of having value 1 being 0.5. If we observe an instance of the sequence, the information content would be 5 bits, as each ...
1 vote
22 views

### Best internal representation of a random variable to enable iterative sampling and interpolation/regression

Let $[0,100]$ denote the interval of real numbers between $0$ and $100$. Given a function $f:[0,100]^n \rightarrow \mathbb{R}^+$, I want to implement the following simple algorithm to search for the ...
1 vote
80 views

### Impact of label flipping on ROC-AUC score

I was exploring a problem of label flipping in the target column: Problem: I have a data frame with just two columns: Predicted probability | Target. Target column is binary (contains only 0 and 1) ---...
• 105
220 views

### Minimum number of comparisons to find $2$nd smallest element

Show that the second smallest of $n$ elements can be found with $n+\lceil\lg n\rceil-2$ comparisons in the worst case. (Hint: Also find the smallest element.) [1] I tried but I have no idea how to, e....
• 159
48 views

### Finding the mode of a continuous distribution

I need to find the empirical mode of a sample of numbers taken from a continuous distribution (i.e. floating-point data). I can think of using an histogram, but choosing an appropriate bin size does ...
32 views

### Sample Complexity Lower bound for PCA

I am trying to find (without success) a sample complexity lower bound for PCA. The concrete problem I am considering is - $X_{1}, X_{2}, \cdots X_{n} \sim D(0, \Sigma)$ are $d$-dimensional vectors ...
88 views

### How to calculate the growth function of a hypothesis class?

I have this hypothesis class: H = {ha : R → {0, 1} | a > 0, a ∈ R, where ha(x) = 1−a,a = { 1, x ∈ [−a, a] 0, x ̸ ∈ [−a, a] } I need to compute the growth function for m>= 0. So I think that this ...
93 views

### Bucket sort for gaussian / standard distribution

I know this post. But I still have no idea to adapt the bucket sort algorithm to handle input with a gaussian / normal distribution. Can someone provide me a Pseudocode / Python code for that? So far ...
• 121
1 vote
215 views

### What set.seed() mean in the Monte Carlo method

I'm trying to learn the implementation of the Monte Carlo method in R language. I am following a course with an example of predicting results for a board game. What I'm not understanding is the usage ...
1 vote
129 views

### Why use Welford's Method over a more naive approach?

I came across this pair of blog posts explaining the problem with calculating variance on floating point data: https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-3-a-variance-...
• 111
32 views

### How to create random pseudo samples from a non-stationary time series containing NaNs using Monte-Carlo method?

I am looking for answers creating 500 samples of non-stationary Time series based on its probability distribution preferably using monte-carlo simulation. DATA LINK Secondly, the most example ...
1 vote
74 views

### Efficient algorithm for finding linear combination of piecewise functions

While porting an algorithm, I having a bit of a problem with finding an efficient algorithm for finding a linear combination of piecewise functions. The procedure is described in the Table 3 of the ...
• 113
1 vote
43 views

### Naïve array sampling algorithm: the possibility of a item being chosen and its time complexity

This naïve sampling algorithm I am talking about is fairly simple: create a set for storing chosen items first, randomly select an item from the array, and examminate if it is in the set. If it isn't, ...
• 111
31 views

• 121
43 views

### PCA applicability

I understand that PCA takes a data set with input size, with output labels, and reduces the inputs to a set of principal components size r, where r < n. My question is whether or not this can be ...
146 views

• 137
35 views

### Does this problem have a formal name?

I have come across the following problem but am unable to understand the solution for it. Hence I would like to know if it has a formal name then, I can search for it and read about it in more detail. ...
• 215
91 views

### How to find clusters of a set of points in n-dimensional space that are furthest from unwanted points

I have a list of 25 points and their coordinates in a 512-dimensional space. I have 8 target points and 17 points I need to avoid (the 17 points to avoid also have differences in priority of how ...
1 vote
For $P(x)=N(\mu,\sigma^2)$ and $Q(x)=N(0,1)$ I am supposed to calculate $KL(P(x)||Q(x))$, here is what I did \begin{align*} KL(P(x)||Q(x)) & = \int P(x) \cdot \log\left(\frac{P(x)}{Q(x)}\...