2
$\begingroup$

Some background about myself: I have sufficient knowledge in probability but not in statistics.

Suppose I have $n$ i.i.d samples, $\{x_i\}$, sampled from an unknown distribution $X$. Given a function $f: \mathcal X \rightarrow \mathbb R$, I want to conduct a statistical test using this sample to determine if $f(X)$ is "skewed towards positive" or negative value. Specifically, $f(X)$ is said to be "skewed towards positive" if $f(X) > 0$ for more than 50% of the whole population of $X$. What is the appropriate statistic test for this case? Answers with some assumptions on $X$ and/or $f$ are also welcome.

I think, I need to first define a null hypothesis that is $f(X)$ is "skewed towards positive". Then, I evaluate $\{f(x_i)\}$ for all samples and decide whether number of observation of positive values surpasses the negative values. Is this a correct statistical test or is there a better test?

$\endgroup$
6
  • $\begingroup$ Just bootstrap it and perform a bootstrap test? $\endgroup$
    – Ggjj11
    Commented Feb 16 at 8:53
  • $\begingroup$ Is the function $f$ known (or do you only see the values of $f(x_i)$ from your sample data? Is the function continuous? Monotonic? $\endgroup$
    – Ben
    Commented Feb 16 at 9:12
  • $\begingroup$ @Ggjj11 how do I know if it yields a consistent estimator? $\endgroup$ Commented Feb 16 at 9:14
  • $\begingroup$ @Ben The function $f$ is known. This means $x_i$ and $f(x_i)$ are known. The function is continuous but not necessarily monotonic. $\endgroup$ Commented Feb 16 at 9:17
  • $\begingroup$ @Ggjj11 For a bootstrapping method, can't it be computed directly how the properties of the bootstrapping distribution will look like? $\endgroup$ Commented Feb 16 at 10:30

1 Answer 1

4
$\begingroup$

This is a median test --- it is usually done using nonparametric methods

To put your problem in standard statistical terminology, let $Y = f(X)$ and let $\phi_Y$ denote the median of the distribution of $Y$. You want to test whether $\phi$ is positive, which is a one-sided test of the hypotheses:

$$H_0: \phi_Y = 0 \quad \quad \quad \quad \quad H_A: \phi_Y > 0.$$

(It is probably more sensible to describe things in these terms, since "skewness" has a specific meaning in probability and statistics that is different to what you are looking at here.) This is a one sample median test where you observe data of the form $y_1,...,y_n$ and you test the unknown median of the distribution of this data against a hypothesised value.

This type of testing is usually done using nonparametric methods similar to a test of distribution, but instead we now focus on only a single quantile. There are a few nonparametric tests of this kind, which are usually variants of the Pearson chi-squared test. The specific test you want to use will depend on whether or not you can have outcomes that occur exactly at the median in the null hypothesis, which depends on the details of the function you are using and the type of underlying data. In particular, if $X$ is a continuous random variable and $f$ is a continuous strictly monotonic function then $Y$ will also be a continuous function and so you will not get any data points exactly on the hypothesised median. In other cases there may be a non-zero probability of data occurring on the hypothesised median. I recommend you have a look at nonparametric one-sided median tests and use one of these to perform your hypothesis test.


Simplification in a special case: One simple case of interest occurs when $f$ is a known monotonic function and $X$ is a continuous random variable. Consider the case where $f$ is montonically increasing and compute the input value:

$$x_* = \inf \{ x \in \mathbb{R} | f(x) > 0 \}.$$

We then have $f(x) > 0$ for all $x > x_*$ and $f(x) \leqslant 0$ for $x < 0$, which means that $\phi_Y > 0$ is equivalent to $\phi_X > x_*$. Your hypothesis test can then be framed directly in terms of the distribution of the underlying values without reference to the function:

$$H_0: \phi_X = x_* \quad \quad \quad \quad \quad H_A: \phi_X > x_*.$$

In this case you can perform your one-sided hypothesis test directly on the underlying data for $X$ using your knowledge of the structure of the function $f$. For most median tests this will be equivalent to testing on $Y$ but it takes things back a step to your underlying data before it is inputted to the function.

$\endgroup$
3
  • $\begingroup$ I appreciate your response. Do you know what is the advantage when doing the median test on $X$ directly, as in your simplification in a special case, instead of doing it on $Y$? For example, does it require less $n$? $\endgroup$ Commented Feb 16 at 10:15
  • $\begingroup$ @Interception it means that we have the possibility of "using your knowledge of the structure of the function $f$". This can make the estimate of the median more efficient. For example, if $f$ is normal distribution then instead of a non-parametric test a parametric test will be better (ie. the sample mean will be a better estimator of the median than the sample median). $\endgroup$ Commented Feb 16 at 10:25
  • $\begingroup$ Great answer. I would add that you can bootstrap such a median test :) $\endgroup$
    – Ggjj11
    Commented Feb 16 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.