Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [median]

The median is the value below which half the data or probability distribution lies - when the sample size is odd, the median is the 'middle' value of an ordered sample.

2
votes
1answer
25 views

Asymptotic distribution of median estimator when density doesn't exist

We know that when density(say $f$) exists at the median(say $\theta$) then the median estimator(say $\hat{\theta_n}$) has the following property $$ \sqrt n(\hat{\theta_n}-\theta) \to^d N(0,1/\{4f(\...
2
votes
1answer
41 views

Why median is NA for some of the group outcomes in survival analysis?

I'm trying to do survival analysis using the Followup information, patient_vital_status and the expression of gene. I'm using like below: ...
0
votes
0answers
8 views

Real (not rounded) Lower and Upper limits of groups of frequency distribution and Median for infinitely continuous data

From here on page 5: https://www.pbarrett.net/techpapers/percentiles.pdf So how can both be correct – yet seem to be more appropriate under different conditions? The clue is spread throughout the ...
0
votes
0answers
10 views

With few respondents on a 1 to 10 scale, is it better to use a weighted mean or the median?

I have survey data where ~20 respondents replied to some questions on a scale of 1 to 10. For the most part, none of the distributions are Gaussian. A set of questions look to find out a participants ...
0
votes
0answers
15 views

Are median values numeric or ordinal?

I'm trying to set up the input data that I'd feed into my DL model and for the simplicity, I'm thinking of plugging in only the min/max/average values of the original data. (This is necessary for my ...
7
votes
2answers
828 views

Calculate variance without calculating the mean

Can we calculate the variance without using the mean as the 'base' point?
0
votes
0answers
17 views

Paired Wilcoxon signed rank test-compare median

I have been comparing driving behavior before and after a technological intervention for a specific group of people. My data is far from normal hence I have used paired Wilcoxon signed rank test. If ...
0
votes
0answers
8 views

Median of demeaned variables and fixed effects

I have observations of the profit $y_{it}$ for several firms, noted $i$, over time $t$. For each firm, I compute the mean of $y$ over the years and call it: $\bar{y_i}$. Then I substract this firm-...
1
vote
0answers
49 views

modified z score

I am using Modified Z-Score to find out outliers on a time series data on exit rate for a website. N = 1131. Based on last 3 years daily data (1096 values), i am finding out outliers for the ...
3
votes
0answers
22 views

Measures of central tendency for right-skewed size distributions

Suppose we are looking at a right-skewed size distribution such as the distributions of income, casualty losses, or flood sizes, and we want to look at some alternative measures to jointly represent ...
0
votes
2answers
38 views

Median Absolute Deviation

How median Absolute deviation is immune to outliers? R2 or coefficient of determination is affected by outliers. And how this MAD is going to remove that constraint?
2
votes
1answer
31 views

What is the ideal population size so that its median is a representative statistical measure? [closed]

I am perfoming a robust z-score analysis to remove trends of temporal evolution of a certain variable so that I can compare different years. It is robust because there are outliers. My data is ...
2
votes
0answers
26 views

Statistically determining the median of a data set via quantiles of a sample

I was thinking of algorithms for statistically determining the median of a large data set. To estimate the complexity of my idea I need the following Probability: I have a dataset $\left\{x_i \right\}...
2
votes
1answer
34 views

Sufficient conditions for equal marginal medians

Let $X, Y$ be dependent random variables taking values on the same set (either a finite set, an interval or the real line). I'd like to know if there's any condition on $P(Y|X)$ which ensures that $$\...
1
vote
0answers
18 views

Confidence on the median for a weighted empirical distribution

I have observation data $x_1, \dots, x_n$ with associated positive weights $w_1, \dots, w_n$ such that $\sum_i w_i = 1$, representing a "weighted" empirical distribution with CDF $$ \hat{F}(x) = \sum_{...
0
votes
1answer
23 views

Help with psychological research for my dissertation?

1) Is median split effective to divide participants in 2 groups considering their scores on a scale? I am using PECK scale (Personal experience checlist) and i need to divide participants into minimum ...
1
vote
1answer
22 views

Analyzing/visualizing tightly grouped discrete results

I've been having a very hard time finding a good representation (visual or analytical) for lots of data points on a very small, discrete scale. e.g. given a set of results from 1 to 5 in increments of ...
3
votes
1answer
43 views

Name of mean- or median-like values?

Consider the data points $x_i \in \mathbb R$ for $i=1,\ldots,n$ as well as following definition: $$\hat x_c := \underset{{r\in \mathbb R}}{\operatorname{argmin}}\sum_i \vert r - x_i \vert^c $$ This ...
-1
votes
2answers
90 views

Cauchy distribution: R code [closed]

Generate 1000 sets of numbers from the Cauchy distribution. Do this for set size 2, 5, 10 and 20. Compute the median of each set. Find the distribution of the medians, for each set size. How do I ...
0
votes
0answers
23 views

Best estimator for the variance of the empirical median

Let $X_i$ be $n=2k+1$ IID continuous random variables with distribution function $F$ and quantile function $F^{-1}$. Let $m$ be their empirical median. It is well known that: If the $X_i$ were ...
0
votes
0answers
34 views

Mean and variance of the median estimator [duplicate]

We are given an i.i.d sample of size n, $X_{1},...,X_{2}$. We also know that for all i, $EX_{i}=\mu,Var{X_{i}}=\sigma^{2}$. Let us define $\hat{X}_{median}$ as the median of these samples: $\hat{X}...
0
votes
1answer
237 views

Calculate Median Value of Likert Scale data

I have a dataset in a Likert Scale: strongly agree, agree, neutral, disagree, strongly disagree (see attached). (i) Is there an online calculator that can used to calculate the Median for each item ...
0
votes
1answer
46 views

Welch t-test using the median and MAD

Can the Welch t-test be used with the median and MAD instead of mean and variance? I think outliers are causing problems and the median places less weight on extreme outliers. I'm using this to test ...
1
vote
0answers
20 views

Is there a standard way to write row-wise median in matrix notation?

The background: I have estimated N time series models, each having the same coefficients. From each of the models i have a column vector of the coefficients: $(\alpha_{i,0},\alpha_{i,1},\alpha_{i,2}...
2
votes
0answers
21 views

Median versus Harmonic Mean As Log Normal Data Summary

I have a set of data that follows a lognormal distribution (it is fixed-distance, variable-speed situation https://stats.stackexchange.com/a/23130/55305). I am trying to summarize the data in a single ...
0
votes
0answers
43 views

Standard error of median small sample

I tried to find this question but what I've found provides answers for normal distributions and large sample sizes. I'm analyzing some data from an experiment with different groups. Each group has ...
4
votes
1answer
392 views

Median of Rayleigh Distribution

I am not sure how to solve the following problem: The probability density function of the Rayleigh distribution is, $\ f(x;α) = \frac{x}{α^2} e^\frac{-x^2}{2α^2}, x ≥ 0, $ where α is the scale ...
0
votes
1answer
33 views

Pros and cons of using a median version for measuring dispersion?

If a data set is in the presence of some outliers, then the sample average could not be a "fair" measure of the centrality of that data set. Instead, the sample median could be a better choice. ...
0
votes
1answer
22 views

Why does the formula for the median assume continous classes (grouped data)?

I was working through problems of the median (grouped data). I encountered a problem where the classes were not continuous, and my textbook said that I needed to make them continuous since the median ...
2
votes
1answer
45 views

Which cumulative distribution of F(X) is equal to the cumulative distribution of its sample median (as sample statistics)

We consider random sampling from a population in which the variable of interest $X$ has some cumulative distribution $F$. Next, we consider a simple random sample of size $n, X_1,\ldots,X_n,$ which ...
2
votes
2answers
61 views

$\mathbb{E}[\min (X_{1:n}) + \max(X_{1:n})]/2 = \mathbb{E}[\text{median}(X_{1:n})]$?

Say $X$ is continuous random variable, and we have $n$ iid samples, denoted as $X_{1:n}$. Then can we say the following $$\mathbb{E}[\min (X_{1:n}) + \max(X_{1:n})]/2 = \mathbb{E}[\mathrm{median}(X_{...
15
votes
3answers
2k views

Is there more than one “median” formula?

In my work, when individuals refer to the "mean" value of a data set, they're typically referring to the arithmetic mean (i.e. "average", or "expected value"). If I provided the geometric mean, people ...
1
vote
5answers
77 views

can you report both a mean and a median for same variable

I have a variable that is not normally distributed. The two groups are statistically significantly different using a non-parametric test. However, they do not "look" different when reporting the ...
1
vote
0answers
9 views

Independent samples design where groups are statistically different at baseline

I have a dataset wherein 2 independent groups received either treatment or placebo using the following 5-session design: Session 1: Baseline (no treatment for either group) Session 2: GroupA=...
0
votes
0answers
21 views

When is it better to exclude outliers and calculate the mean of the data instead of using the median?

I already searched on when to use the mean and median and I often see that median might be better than mean when the data is skewed, ordinal, include outliers, etc.. even tho, this might not be always ...
2
votes
0answers
441 views

Parallel trend assumption in difference-in-differences

I want to run a difference in difference model to evaluate the impact of a policy change using panel data with 30 individuals in the control group and 35 individuals in the treatment group. When ...
1
vote
2answers
38 views

Effects of exclusion on averages

Given a set of data points, if a single point which is above/below the average is excluded, can it be said that the new average will surely decrease/increase? What if the average is the median instead ...
5
votes
1answer
80 views

Effect of adding and removing data on variance

Consider a set of distinct numbers. After removing both the max and the min from the set and adding the median to the set, the set of numbers obviously becomes less dispersed and the variance should ...
1
vote
1answer
76 views

What is the maximum entropy distribution given the median (instead of the mean)?

Given that the median seems to be a more robust statistic than the mean/average, I was wondering if there is a solution of the maximum entropy distribution given the median (or the median and some ...
1
vote
0answers
255 views

Median absolute deviation outlier detection for new data points

I have been reading this article for outlier detection and the method proposed works really well when applied over my data set. However, it would be great if i could run outlier check for new data ...
0
votes
1answer
24 views

Finding population median range from sample

Suppose we take a sample of size 5 from a continuous distribution. What is the probability that the population median lies between the smallest & largest number in our sample?
0
votes
0answers
51 views

Monte Carlo approximation to bootstrapped median equals mean of resample medians?

With respect to the mean, Chernick and LaBudde (2011, 54) write, "We can determine the bootstrap estimate in this case [the mean] without the need for a Monte Carlo approximation, and we would find ...
1
vote
1answer
228 views

Calculating effect size + 95 CIs for median differences (SPSS)

I've got a mixture of parametric and non-parametric data, with a repeated measures design; measuring animal behaviour in three different treatments. For parametric data, it's simple enough calculating ...
13
votes
2answers
1k views

Why does minimizing the MAE lead to forecasting the median and not the mean?

From the Forecasting: Principles and Practice textbook by Rob J Hyndman and George Athanasopoulos, specifically the section on accuracy measurement: A forecast method that minimizes the MAE will ...
-2
votes
1answer
155 views

Wilcoxon matched pairs signed rank test difference in medians but insignificant?

I am trying to understand the result of the Wilcoxon test I used on my small sample. For one measure there is a big difference in the medians between the two conditions. However, the result is highly ...
1
vote
0answers
39 views

Marginal medians of the Dirichlet distribution

I am working with a 3 dimensional Dirichlet distribution with parameters $\alpha_1,\alpha_2,\alpha_3>0$. I have been trying to figure out a useful 'median' concept for this distribution. The vector ...
1
vote
0answers
39 views

Frailty or median values in my cox proportional hazards model?

I am analysing data of woodpecker-made holes and I am interested in seeing what covariates and to what degree affect the survival of these holes (otherwise known as cavities). However, I encounter the ...
2
votes
1answer
160 views

Representing the uncertainty of the median in a clean way

So suppose I want to estimate the fraction of the year a user of some demographics is active, and I have n users (effectively, n samples). So I get the fraction of the year each user is active. It ...
0
votes
0answers
17 views

Is there an equivalent to a linear model that uses the median as central descriptor for categories?

Since the median is often a better central descriptor of skewed distributions, I'd like to know if there is an equivalent method to a linear model for explaining variability of one variable through a ...
1
vote
2answers
73 views

Best Function for “Most of blah happened within X” Instead of average

Real world example - we have a data set with emails sent, and time in seconds from sent date to when a click happened. I want to be able to produce a metric such as: Most of the clicks happened in X ...