Questions tagged [discrete-data]

Refers to data generated from a distribution that has a countable sample space. Discrete data may be nominal (e.g. the distribution of race in a sample of individuals) or ordinal (e.g. the number of errors on a page of text).

Filter by
Sorted by
Tagged with
62
votes
10answers
939k views

What is the difference between discrete data and continuous data?

What is the difference between discrete data and continuous data?
32
votes
5answers
39k 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 ...
29
votes
3answers
19k 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 ...
25
votes
4answers
52k 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 ...
22
votes
1answer
11k 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) ...
21
votes
2answers
965 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 ...
17
votes
2answers
15k 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 ...
17
votes
1answer
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 ...
16
votes
1answer
8k 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 ...
16
votes
2answers
6k 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 ...
13
votes
3answers
9k 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 \...
13
votes
1answer
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 ...
11
votes
3answers
1k 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 ...
11
votes
3answers
1k 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$,...
11
votes
2answers
506 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 ...
11
votes
2answers
10k 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:...
11
votes
1answer
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) ...
10
votes
2answers
346 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 ...
10
votes
1answer
21k 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 ...
9
votes
4answers
1k 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 ...
9
votes
1answer
6k 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 ...
9
votes
2answers
371 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 ...
9
votes
1answer
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 ...
9
votes
1answer
3k 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 ...
8
votes
4answers
8k 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 ...
8
votes
2answers
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(\...
8
votes
1answer
2k 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 ...
8
votes
2answers
436 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 ...
7
votes
3answers
7k 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 ...
7
votes
1answer
486 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 ...
7
votes
1answer
2k 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 ...
7
votes
2answers
559 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 ...
7
votes
2answers
5k 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 ...
7
votes
2answers
2k 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 ...
7
votes
1answer
1k 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 ...
6
votes
4answers
35k views

What are the variance and standard deviation for 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. Does the concept of variance ...
6
votes
1answer
4k 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 ...
6
votes
1answer
459 views

Continuous probability distribution over integers?

I have a random variable which can have any value from the set of natural numbers. For example, the probability of the random variable having a low value is higher than the probability of the random ...
6
votes
2answers
1k views

Notation for possible values of a random variable

Let $X$ be a discrete random variable that can take the values $1, 2, \textrm{and}\ 3$. What is the conventional way to write this mathematically? Is it just $X\in\{1,2,3\}$ or should I somehow write ...
6
votes
2answers
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 ...
6
votes
1answer
720 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 ...
6
votes
1answer
447 views

What are Effective Regression Techniques for Linguistic Analysis of Linked Data?

Cross-post from MathOverflow where it was suggested that I might get better results here. I am in the early stages of a problem that involves parsing a large number ($\approx 5 \times 10^9$) of ...
6
votes
2answers
85 views

Given a bounded number of die rolls following unif{1,6}, produce unif{1,7}

This is a twist on the traditional problem of transforming between uniform discrete distributions of different sizes. For this example, we can roll the die twice and get one of 36 possibilities. The ...
6
votes
1answer
496 views

Question about Dynkin Lehmann Scheffe Theorem

I'm self-studying for an examination, and I would like to understand how to use the Dynkin Lehmann Scheffe theorem for an applied question. I am using Bickel and Doksum's "Mathematical Statistics" (...
6
votes
1answer
354 views

Likelihood test for dividing a distribution into two separate distributions

I've been google-ing around but couldn't find an answer to my question. Any help would be appreciated. The simplest example of my problem is: Imagine I have an bag of marbles of many different colors....
6
votes
2answers
397 views

How to average quantized and truncated data?

So I have data that has been quantized by an analogue to digital converter. (continuous data has been turned into discrete data and the values range from 0 to the saturation value , which is 127 in ...
6
votes
1answer
480 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 ...
6
votes
0answers
1k views

What PDF should be fit to a rank histogram? [closed]

A Rank Histogram (or Talagrand Diagram) is a neat way of measuring whether your numerical model is giving appropriate variance. It's used for weather and climate forcasting, where you only have one ...
5
votes
3answers
2k views

Alternative to Kolmogorov-Smirnov test when parameters are estimated from the data

I need to compare whether two distributions are similar when the values are scaled by the mean of each of the distribution. One limitation of ks-test as per http://www.itl.nist.gov/div898/handbook/eda/...
5
votes
3answers
3k 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 ...