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

How to recover the spatial probability distribution of a GPS location from its accuracy?

A location coordinate determined by GPS is not perfectly accurate. It follows a probability distribution. An Android location comes with an accuracy property. The Android Developer docs for Location.getAccuracy() says: We define horizontal…
2
votes
1 answer

Coding a log-likelihood function in MATLAB

I am following a very detailed post from Quantitative Finance, however, my problem is a coding one. I am trying to estimate a GARCH(1,1) model (not using a statistical toolbox and rather a long hand method, the reason for this is I really want to…
2
votes
0 answers

Probability Distribution for tf.nn.softmax_cross_entropy_with_logits_v2

I am trying to understand the Tensorflow documentation better for tf.nn.softmax_cross_entropy_with_logits_v2(). In the documentation, it states: While the classes are mutually exclusive, their probabilities need not be. All that is required is that…
2
votes
1 answer

memory error by using rbf with scipy

I want to plot some points with the rbf function like here to get the density distribution of the points: if i run the following code, it works fine: from scipy.interpolate.rbf import Rbf # radial basis functions import cv2 import…
2
votes
1 answer

How to identify the modes in a (multimodal) continuous variable

What is the best method for finding all the modes in a continuous variable? I'm trying to develop a java or python algorithm for doing this. I was thinking about using kernel density estimation, for estimating the probability density function of…
2
votes
0 answers

discrete to continuous cumulative density function

My question is that is it possible to convert a vector which stores samples of original CDF (cumulative density function)... something like this: class normal { public: float mean; float sigma; float variance = sigma * sigma; float…
engineer1155
  • 36
  • 13
2
votes
1 answer

R - Get X value for given Y value

I have a cumulative distribution function from a standard normal distribution and I have a given y value, which should be 0.95 dist <- function(x) pnorm(x,0,1) How can I solve the equation 0.95 = dist(x) for x?
Codey
  • 1,131
  • 2
  • 15
  • 34
2
votes
1 answer

plot the tails of distributions

I have two data sets var1 and var2. I want to compare the two distributions. libary(ggplot2) library(reshape) set.seed(101) var1 = rnorm(1000, 0.5) var2 = rnorm(100000,0.5) combine = melt(data.frame("var1" = var1,"var2"= var2)) ggplot(data =…
user3978632
  • 283
  • 4
  • 17
2
votes
1 answer

When and why would you want to use a Probability Density Function?

A wanna-be data-scientist here and am trying to understand as a data scientist, when and why would you use a Probability Density Function (PDF)? Sharing a scenario and a few pointers to learn about this and other such functions like CDF and PMF…
2
votes
2 answers

RGB colour from 0-1 to 0-255 conversion - intensity probability distribution

I'm wondering, if I (and everyone on the internet and in the companies I've worked for) have been converting colours in a wrong way. Obviously, when I want to convert a colour from a 0-255 range to 0-1, I simply divide the values by 255, right? And…
BIOStheZerg
  • 396
  • 4
  • 19
2
votes
1 answer

Plot density curve in R with two density functions

I am struggling to create a continuous density curve in R for the below pdf: { 3x(1-x)^2 0 < x < 1 f(x) = { 3(2-x)(1-x)^2 1 ≤ x < 2 { 0 otherwise Using the curve function, I can plot the two functions separately but not…
Apple_Tree
  • 49
  • 6
2
votes
1 answer

Sampling from a multivariate probability density function in python

I have a multivariate probability density function P(x,y,z), and I want to sample from it. Normally, I would use numpy.random.choice() for this sort of task, but this function only works for 1-dimensional probability densities. Is there an…
Beth
  • 181
  • 9
2
votes
1 answer

How to sum binary binomials in one command?

I'd like to compact the creation of a vector y . It is the rowsum of some binary binomials with a probability each. With rbinom() I tried to define all probabilities at once but it doesn't give me what I want. Here I show the means, but most…
jay.sf
  • 60,139
  • 8
  • 53
  • 110
2
votes
1 answer

How to calculate the log-normal density (starting from the normal density) using SymPy

from sympy import * x, y, mu, sigma, density1, density2 = symbols('x y mu sigma density1 density2') eq1 = Eq(density1, 1/(sqrt(2*pi)*sigma) *exp(-(x-mu)**2/(2*sigma**2))) # normal eq2 = Eq(y, exp(x)) …
winerd
  • 1,813
  • 1
  • 14
  • 12
2
votes
2 answers

Ensure that contents of list sums up to 1 for np.random.choice()

The Context In Python 3.5, I'm making a function to generate a map with different biomes - a 2-dimensional list with the first layer representing the lines of the Y-axis and the items representing items along the X-axis. Example: [ ["A1", "B1",…
user7450368