Questions tagged [probability-density]

In probability theory, the density of a random variable is a function that describes the relative likelihood for this random variable to take on a given value. DO NOT CONFUSE THIS TAG WITH 'PDF': Adobe's file format.

Overview

From wiki:

In probability theory, a probability density function (pdf), or density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. The probability for the random variable to fall within a particular region is given by the integral of this variable’s density over the region. The probability density function is nonnegative everywhere, and its integral over the entire space is equal to one.

Related tags: , , .

Tag Usage

  • DO NOT CONFUSE THIS TAG WITH : Adobe's file format.

  • Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

614 questions
-1
votes
2 answers

Multiply probability distributions in R

I'm trying to multiply some probability functions as to update the probability given certain factors. I've tried several things using the pdqr and bayesmeta packages, but they all work out not the way I intend, what am I missing? A reproducible…
Johan Vos
  • 65
  • 5
-1
votes
1 answer

Plotting probability distribution of data using sklearn's KDE function

I have a number of samples of a variable. I would like to use these samples to plot the probability distribution of the variable. I'm using kernel density estimation with a Gaussian kernel. I'm using sklearn library for this purpose. Here is the…
-1
votes
2 answers

How do I plot a convenient lognormal pdf with my data?

I have a random variable Words per sentence which contains those values: words_per_sentence = [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,…
-1
votes
1 answer

Applying different versions of a function to different columns of another Dataframe in R

Following this thread computing probabilities the verified answer contained a for loop and prop.tables. I want to combine both into one single function such that every "b" should represent a column of a dataframe. For example…
-1
votes
1 answer

Tensorflow Independent distribution mathematics

I read about a function in tensorflow, which re-parametrizes number of independent distributions to give a probability distribution https://www.tensorflow.org/probability/api_docs/python/tfp/distributions/Independent Unfortunately, there is no…
-1
votes
1 answer

How can I calculate probability from the log-normal distribution probability density function graph in python?

How can I find probability between certain values from the lognormal distribution probability density function with Python? Thank you.
-1
votes
1 answer

Interpolate density using a number of points instead of random sampling

When R calculates density(x) it uses n = 512 (I believe) so it randomly tries to pick 512 points and interpolates a density function using those points. I have a list of points (p) that I would like to use when computing density(x) INSTEAD of…
Denis
  • 11,796
  • 16
  • 88
  • 150
-1
votes
1 answer

How to make grouped summary statistics based off of densities in R

Goal: I would like to generate grouped percentiles for each group (hrzn) I have the following data # A tibble: 3,500 x 3 hrzn parameter density 1 1 0.0183 0.00914 2 1 0.0185 0.00905 3 1 0.0187…
Alex
  • 2,603
  • 4
  • 40
  • 73
-1
votes
1 answer

Calculation of expected value for specific integral (through norm.pdf and integrate.quad) does not work with input parameters

My problem: integrate.quad does not work with my input parameters (dataFrames). My goal: Calculating expected value for a defined function and specific mu, sigma, lower bound and upper bound of integral per product Desired output: 2x2 dataFrame …
-1
votes
1 answer

How do I calculate conditional density in a dataframe?

I have a data frame like the one below. amplitude -13.125 |-13.125 |-11.875 |-11.875 |-11.25 |-11.25 duration -----------|--------|--------|--------|--------|-------- 1 NaN |NaN |NaN |NaN |NaN |NaN 2 NaN …
-1
votes
1 answer

Approximate continuous probability distribution in Matlab

Suppose I have a continuous probability distribution, e.g., Normal, on a support A. Suppose that there is a Matlab code that allows me to draw random numbers from such a distribution, e.g., this. I want to build a Matlab code to "approximate" this…
TEX
  • 2,249
  • 20
  • 43
-1
votes
1 answer

Generating only one density graph for each group of user - R

I have a binary data frame, which each row represents data related to a user (size of data frame :90 rows * 65 cols). The last column of this data frame contains the label for the users (4 labels :Excellent, Good, bad, fail). My question is, how can…
Ester Silva
  • 670
  • 6
  • 24
-1
votes
1 answer

How do I combine two electromagnetic readings to predict the position of a sensor?

I have an electromagnetic sensor and electromagnetic field emitter. The sensor will read power from the emitter. I want to predict the position of the sensor using the reading. Let me simplify the problem, suppose the sensor and the emitter are in 1…
-1
votes
2 answers

Python: Histogram with range, but distribution is calculated for whole set

I'm using the matplotlib to draw a pdf histogram and need to use the range variable due to the appearance of the graph. Got a high in the start and in the end, the probability chance is so much higher for these peaks so the rest of the graph can't…
CNAP
  • 55
  • 1
  • 9
-1
votes
1 answer

How to implement the probability density function estimation?

I have a set of objects described by a set of features (that are represented by real numbers). For a given feature, I would like to identify its peaks, that is, the set of values of high probability and that are local maximums. I think that I would…
1 2 3
40
41