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
2
votes
0 answers

Mutual information between class labels and features. MATLAB

I hope you can help me in find the problem here. I want to implement the algorithm Mutual Information-based best individual feature. As part of the algorithm I need to calculate the Mutual Information (MI) between each n dimentional feature vector…
2
votes
2 answers

How do I implement the Probability density function of a Gaussian Distribution

I need to implement a class in Python, that represents a Univariate (for now) Normal Distribution. What I have in mind is as follows class Norm(): def __init__(self, mu=0, sigma_sq=1): self.mu = mu self.sigma_sq = sigma_sq …
2
votes
1 answer

Add shaded standard error curves to geom_density in ggplot2

I would like to add shaded standard error curves to geom_density using ggplot2. My code looks like this: data.plot <- data.frame(x = c(rnorm(100, mean = 0, sd = 5), rnorm(100, mean = 1, sd =2 )), …
Andrew
  • 678
  • 2
  • 9
  • 19
2
votes
1 answer

Training of continuous densitiy HMMs with underflow in calculating densities

I have implemented the evaluation and training algorithms for HMM following the Rabiner Tutorial for a single oberservation sequence (based on MFCC data). For the forward and backward algorithm I have also included the proposed scaling to handle…
Daniel
  • 31
  • 2
2
votes
1 answer

Custom PDF from scipy.stats.rv_continuous unwanted upper-bound

I am attempting to generate a random probability density function of QSO's of certain luminosity with the form: 1/( (L/L_B^* )^alpha + (L/L_B^* )^beta ) where L_B^*, alpha, and beta are all constants. To do this, the following code is used: import…
2
votes
0 answers

R: Coloring the contour based on condition

I have two variables (z and z1). I need to overlay the contours and find the overlapping and non overlapping area between them. z<-matrix(c(rep(0.9,8),0.9,0.9,rep(0.8,7),0.9,0.9,0.8,rep(0.7,5),0.8,0.9, …
2
votes
1 answer

C# MathNet FFT Definition

I have some problem when testing FFT from MathNet: The idea is that if I apply FFT to the characteristic function of a gaussian variable I should find the gaussian density function. When I plot VectorFFT the figure does seems a density function but…
plccrl
  • 21
  • 2
2
votes
1 answer

boost::math::pdf, how does it compute a probability from a normal distribution with just 1 value?

I am using the boost::math::pdf to calculate a probability from a normal distribution. I give a variable which corresponds to distance to the mean and boost::math::pdf gives me a porbability in return. It works, but i really dont get how because in…
Firat.Berk.Cakar
  • 185
  • 1
  • 12
2
votes
2 answers

How to choose an item in a list according to a specific probability?

Let's assume that we got a list like the one below: list = [[A,10,3],[B,5,2],[C,8,1]] For each item in the list there is a probability to be chosen which could be calculated by softmax. for example for first element (A) we have: from math import…
Masoud Masoumi Moghadam
  • 1,094
  • 3
  • 23
  • 45
2
votes
1 answer

How to plot binomial PDF distributions centered on same mean

I'm trying to plot a few Binomial distributions and show that as N increases, the curve looks more and more like the normal. I've tried using dbinom, but here's what I get: Here's the code I'm using to produce this distribution: x <- -5:250 y10 <-…
2
votes
0 answers

How to create a probability-density graph based on data from a binary classifier?

I trained a binary classifier using scikit-learn and plotted some ROC curves to evaluate it. The problem is I have to present it to someone else and ROC curves are not so intuitive. I found a nice graph showing the probability density distributions…
2
votes
1 answer

Python, How to find a specific value when integrating a KDE?

I have a KDE which represent a probability density function (PDF). Now, I want to get the value of the variable lower that satisfies: kde.integrate_box_1d(lower, 2.0) == 0.05 where 0.05 is the "critical value". 2.0 is the upper limit. So far, I…
Ivan Castro
  • 581
  • 2
  • 10
  • 22
2
votes
1 answer

Plot Lognormal Probability Density in R

I am trying to generate a plot for Lognormal Probability Density in R, with 3 different means log and standards deviation log. I have tried the following, but my graph is so ugly and does not look good at all. x<- seq(0,10,length = 100) a <-…
Smith Pay
  • 49
  • 1
  • 7
2
votes
1 answer

confusion on 2 dimension kernel density estimation in R

A kernel density estimator is used to estimate a particular probability density function (see mvstat.net and sckit-learn docs for references) My confusion is about what exactly does kde2d() do? Does it estimate the joint distribution probability…
Lin Ma
  • 9,739
  • 32
  • 105
  • 175
2
votes
0 answers

Find the probability density of a new data point using “density” function using matlab?

I have two datasets namely reference dataset and new dataset; All datasets have power and speed for a power curve (Power Vs Speed) of wind turbine. Power is in vertical axis and Speed is in horizontal axis. I want to use my new incoming data points…