Questions tagged [discrete-data]

Refers to data generated from a distribution that has a countable sample space. The discrete data tag may encompass categorical data, whether nominal (e.g. the distribution of race in a sample of individuals) or ordinal (e.g. socio-economic status), or an actual discrete random variate, such as a set of event counts (e.g. the number of errors on a page of text). Discrete data need not necessarily be integer, however.

Filter by
Sorted by
Tagged with
73 votes
10 answers
1.1m views

What is the difference between discrete data and continuous data?

What is the difference between discrete data and continuous data?
user avatar
  • 881
41 votes
3 answers
32k views

Is Kolmogorov-Smirnov test valid with discrete distributions?

I'm comparing a sample and checking whether it distributes as some, discrete, distribution. However, I'm not enterily sure that Kolmogorov-Smirnov applies. Wikipedia seems to imply it does not. If it ...
user avatar
  • 740
38 votes
5 answers
56k views

Clustering a dataset with both discrete and continuous variables

I have a dataset X which has 10 dimensions, 4 of which are discrete values. In fact, those 4 discrete variables are ordinal, i.e. a higher value implies a higher/better semantic. 2 of these discrete ...
user avatar
  • 591
37 votes
2 answers
32k views

Dropping one of the columns when using one-hot encoding

My understanding is that in machine learning it can be a problem if your dataset has highly correlated features, as they effectively encode the same information. Recently someone pointed out that ...
user avatar
  • 668
31 votes
4 answers
75k views

Predicting with both continuous and categorical features

Some predictive modeling techniques are more designed for handling continuous predictors, while others are better for handling categorical or discrete variables. Of course there exist techniques to ...
user avatar
29 votes
1 answer
15k views

Kolmogorov-Smirnov with discrete data: What is proper use of dgof::ks.test in R?

Beginner questions: I want to test whether two discrete data sets come from the same distribution. A Kolmogorov-Smirnov test was suggested to me. Conover (Practical Nonparametric Statistics, 3d) ...
user avatar
  • 968
21 votes
2 answers
1k views

Does this discrete distribution have a name?

Does this discrete distribution have a name? For $i \in 1...N$ $f(i) = \frac{1}{N} \sum_{j = i}^N \frac{1}{j}$ I came across this distribution from the following: I have a list of $N$ items ranked ...
user avatar
  • 313
20 votes
1 answer
4k views

Basic questions about discrete time survival analysis

I am attempting to carry out a discrete time survival analysis using a logistic regression model, and I'm not sure I completely understand the process. I would greatly appreciate assistance with a ...
user avatar
19 votes
4 answers
16k views

Probability formula for a multivariate-bernoulli distribution

I need a formula for the probability of an event in a n-variate Bernoulli distribution $X\in\{0,1\}^n$ with given $P(X_i=1)=p_i$ probabilities for a single element and for pairs of elements $P(X_i=1 \...
user avatar
19 votes
2 answers
9k views

Anomaly Detection with Dummy Features (and other Discrete/Categorical Features)

tl;dr What is the recommended way to deal with discrete data when performing anomaly detection? What is the recommended way to deal with ...
user avatar
17 votes
2 answers
19k views

How to fit a discrete distribution to count data?

I have the following histogram of count data. And I would like to fit a discrete distribution to it. I am not sure how I should go about this. Should I first superimpose a discrete distribution, say ...
user avatar
15 votes
2 answers
9k views

Classification with ordered classes?

Say I want to train a classifier that assigns an image of a person as young, middle-aged, or old. A simple way would be to treat the classes as independent categories and train a classifier. But ...
user avatar
  • 14.2k
14 votes
1 answer
2k views

Hamiltonian Monte Carlo and discrete parameter spaces

I've just started building models in stan; to build familiarity with the tool, I'm working through some of the exercises in Bayesian Data Analysis (2nd ed.). The Waterbuck exercise supposes that the ...
user avatar
  • 80.2k
14 votes
1 answer
31k views

How to test if my data is discrete or continuous?

It seems to me that to choose the right statistical tools, I have to firstly identify if my dataset is discrete or continuous. Could you mind to teach me how can I test whether the data is discrete ...
user avatar
  • 561
13 votes
3 answers
3k views

Properties of a discrete random variable

My stats course just taught me that a discrete random variable has a finite number of options ... I hadn't realized that. I would have thought, like a set of integers, it could be infinite. Googling ...
user avatar
  • 392
13 votes
2 answers
13k views

Optimal Binning with respect to a given response variable

I'm looking for optimal binning method (discretization) of a continuous variable with respect to a given response (target) binary variable and with maximum number of intervals as a parameter. example:...
user avatar
  • 231
12 votes
3 answers
2k views

Visualize bivariate binomial distribution

Question: what does a bivariate binomial distribution look like in 3-dimensional space? Below is the specific function that I would like to visualize for various values of the parameters; namely, $n$,...
user avatar
  • 3,987
12 votes
2 answers
2k views

Determining an optimal discretization of data from a continuous distribution

Suppose you have a data set $Y_{1}, ..., Y_{n}$ from a continuous distribution with density $p(y)$ supported on $[0,1]$ that is not known, but $n$ is pretty large so a kernel density (for example) ...
user avatar
  • 41.4k
11 votes
2 answers
692 views

What's the name of this discrete distribution (recursive difference equation) I derived?

I came across this distribution in a computer game and wanted to learn more about its behaviour. It comes from the decision as to whether a certain event should occur after a given number of player ...
user avatar
  • 223
11 votes
3 answers
12k views

Comparing two (or more) discrete distributions

I would like to know what the most powerful way of comparing two (or more) discrete distributions is. I know that the Kolmogorov-Smirnov test could be used (if corrected for the discrete ecdfs), and/...
user avatar
  • 318
10 votes
5 answers
2k views

Discrete and Continuous variables. What is the definition?

The definition of a continuous variable in our class seems to be, well, not a definition, as there are exceptions not included in its definition. I am a 4th year math student and find it appalling ...
user avatar
  • 203
10 votes
2 answers
424 views

Distributions over sorted lists

Say we have an ordered list of items [a, b, c, ... x, y, z, ...] I am looking for a family of distributions with support on the list above governed by some ...
user avatar
10 votes
2 answers
7k views

What is the best way to discretize a 1D continuous random variable?

Say I have a 1-dimensional continuous random variable $X$, with PDF $f(X)$, CDF $F(X)$ and inverse CDF $F^{-1}$. What is the best way to discretize $X$? To keep things clear, let $Y$ denote the ...
user avatar
  • 4,375
10 votes
1 answer
8k views

How to to find and evaluate optimal discretization for continuous variable with $\chi^2$ criterion?

I have a data set with continuous variable and a binary target variable (0 and 1). I need to discretize the continuous variables (for logistic regression) with respect to the target variable and ...
user avatar
  • 405
10 votes
1 answer
3k views

Discrete functions: Confidence interval coverage?

How to calculate discrete interval coverage? What I know how to do: If I had a continuous model, I could define a 95% confidence interval for each of my predicted values, and then see how often the ...
user avatar
  • 3,363
9 votes
1 answer
5k views

Discrete analog of CDF: "cumulative mass function"?

We call the integral of a probability density function (PDF) a cumulative distribution function (CDF). But what's the cumulative sum of a probability mass function (PMF) called? I've never heard the ...
user avatar
  • 1,085
9 votes
4 answers
2k views

Does an urn's probability distribution change as you draw from it without replacement on average?

Suppose I have an urn containing N different colours of balls and each different colour can appear a different number of times (if there are 10 red balls there need not also be 10 blue balls). If we ...
user avatar
  • 337
9 votes
3 answers
6k views

Implementing a discrete analogue to Gaussian function [closed]

Given a Gaussian function of the form $$g(x) = ae^{-(x-b)^2/(2c^2)}$$ I am interested in a discrete analogue to this, which deals with the case where $x$ is discrete. As I understand there are two ...
user avatar
  • 199
9 votes
1 answer
3k views

Complete sufficient statistic

I've recently started studying statistical inference. I've been working through various problems and this one has me completely stumped. Let $X_1,\dots,X_n$ be a random sample from a discrete ...
user avatar
  • 91
9 votes
2 answers
723 views

Distributions on subsets of $\{1, 2, ..., J\}$?

I'm wondering if there are any sorts of standard distributions on subsets of integers $\{1, 2, ..., J\}$. Equivalently, we could express this as a distribution on a $J$ length vector of binary ...
user avatar
  • 8,032
9 votes
1 answer
222 views

Marginalizing out discrete response variables in Stan

There's been quite a bit of discussion and confusion about how to marginalize out discrete response variables in Stan (e.g. binary or ordinal data). See, for instance: Impute binary outcome variable ...
user avatar
  • 125
9 votes
2 answers
523 views

Conservativeness of tests based on a discrete random variables

For discrete test statistics, the distribution of the corresponding $p$-value is discrete and stochastically larger than the uniform distribution. Hence the corresponding hypothesis test based on the ...
user avatar
  • 973
9 votes
1 answer
5k views

Discrete data & alternatives to PCA

I have a dataset of discrete (ordinal, meristic, and nominal) variables describing morphological wing characters on several closely related species of insects. What I'm looking to do is conduct some ...
user avatar
  • 91
8 votes
4 answers
10k views

Calculating PDF given CDF

I know that the PDF is the first derivative of the CDF for a continuous random variable, and the difference for a discrete random variable. However, I would like to know why this is, why are there ...
user avatar
8 votes
2 answers
371 views

Sum of sample given a priori knowledge of its maximum

Given a sample of discrete random variables $X_1, X_2, \ldots, X_n \sim F$, I am looking to calculate the distribution given by the probability mass function: $$P\left(\sum_{i=1}^n X_i = x~\middle|~\...
user avatar
8 votes
2 answers
2k views

Accurately generating variates from discrete power law distribution

What are the best methods to accurately generate random integers distributed according to a power law? The probability of getting $k$ ($k=1,2,\ldots$) should be equal to $p_k = k^{-\gamma} / \zeta(\...
user avatar
  • 1,128
8 votes
2 answers
383 views

Regression model for integer response

Let the response be $Y_i \in \mathbb{Z}$ and the covariate $X_i \in \mathbb{R}^p$. For counting data where $Y_i$ are restricted to be nonnegative, we have Poisson regression or negative binomial ...
user avatar
  • 83
8 votes
1 answer
609 views

Multinomial choice with binary observations

Is there a standard name for a multinomial choice model where the observations are in the form of binary questions such as "do you prefer A to B" and "do you prefer B to D"? This seems like a common ...
user avatar
  • 1,592
8 votes
3 answers
241 views

How to estimate discrete probability distribution from a dataset of pairwise frequencies?

My problem is best explained with an example.. Suppose every day I count the cars driving down my street, but because I'm a slow counter, I only count two different types of cars per day. On the first ...
user avatar
  • 1,722
7 votes
5 answers
105k views

What are the variance and standard deviation for the bin counts for n rolls on a standard six-sided die?

I'm having trouble imagining what variance and deviation mean with a series of die rolls. That is, a fair die will fall with a flat distribution on all its values 1-6 in 6 bins (1, 2, 3, 4, 5, 6) ...
user avatar
  • 523
7 votes
3 answers
8k views

How to test group differences on a five point variable?

I have a series of observations that fall into bins (or "scores"); that is, the data can be 0, 1, 2, 3 or 4. There are two groups of such data, control and treated. I know the number of individuals ...
user avatar
7 votes
2 answers
7k views

Can the discrete variable be a negative number?

I read in a book "An Introduction to Statistical Concepts [3 ed.] p.8): A numerical variable is a quantitative variable. Numerical variables can further be classified as either discrete or ...
user avatar
  • 957
7 votes
1 answer
4k views

Why is this random variable both continuous and discrete?

The waiting time, $W$, of a traveler queuing at a taxi rank is distributed according to the cumulative distribution function, $G(w)$, defined by: $$G(w) = \begin{cases} 0 & \text{ for } w&...
user avatar
  • 576
7 votes
1 answer
3k views

Power-law fitting and testing

I want to test the distribution that best fit a specific metric (that I call SD) extracted from the source code of systems. I have a guess that they follow a power-law behavior. My sample: 20 systems ...
user avatar
7 votes
2 answers
743 views

5 defectives rule of thumb

I have taught six sigma black belt classes using consultant sourced training materials which included the rule of thumb that when estimating the rate of occurrence of discrete events, like the ...
user avatar
7 votes
2 answers
1k views

How to be sure about the distribution of a discrete and limited stochastic variable?

I've got a stochastic variable $X$ which takes the values in $\{0,1,2\}$ with some unknown probabilities. I want to know the distribution, and can sample $X$ as many times as I want to. How many times ...
user avatar
  • 339
7 votes
1 answer
772 views

All-Purpose Sample Entropy

When given samples of a discrete random variable, the entropy of the distribution may be estimated by $- \sum \hat{P_i} \log{\hat{P_i}}$, where $\hat{P_i}$ is the sample estimate of the frequency of ...
user avatar
  • 10.4k
7 votes
1 answer
2k views

Expected value for discrete (nominal) variable?

I'm trying to understand the concept of the expected value. Especially, what bothers me is the expected value for discrete random variables. I will try to formulate it by examples: The expected value ...
user avatar
  • 175
7 votes
1 answer
2k views

Appropriate tests on discrete and paired data

I am going back and forth on which tests to do. I have two paired variables, that are both positive integers (0,1,2,3...etc). $n = 559$. The variables represent the error resulting from two different ...
user avatar
  • 81
7 votes
0 answers
7k views

Is there a discrete version of the exponential distribution? [duplicate]

The exponential distribution is well-known and widely used but defined for a continuous variable. Is there a discrete version of it?
user avatar
  • 71

1
2 3 4 5
12