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
0
votes
1 answer

Error in exponential PDF

I need to complete the function exponentialPDF but get an error: 'IndexError: index 0 is out of bounds for axis 0 with size 0' The function looks like this: def uniformPDF(x,a=0.0,b=4.0): p = 1.0/(b-a)*ones((len(x),)) p[x
Veysel
  • 23
  • 5
0
votes
0 answers

Using numpy.trapz() to calculate a pdf

I have some polar [R,theta] data, that I want to express as a pdf. As I understand it, I simply normalize the data, so its integral is 1. I am using numpy.trapz() method, but am a bit unsure of the syntax. The code below shows what I have tried, I…
Dave
  • 1,170
  • 3
  • 20
  • 30
0
votes
1 answer

How to get the confidence interval for a function using R

I have such a csv file with the first column being a value and the second column being the number of times this value appears. Basically, it's a probability distribution. Now I want to use R to calculate a confidence interval. Say what's the…
0
votes
0 answers

Fitting Model Parameters To Histogram Data in R

So I've got a data set that I want to parameterise but it is not a Gaussian distribution so I can't parameterise it in terms of it's mean and standard deviation. I want to fit a distribution function with a set of parameters and extract the values…
CER
  • 27
  • 5
0
votes
1 answer

Optimize computation time for PDF approximation based on Kernel Density Estimation

I have a code to find the pdf's approximation of a vector based on the formula for kernel estimation: I implemented this formula in the code below (see previous question). However, that code takes long time to run (two loops are used). Could you…
0
votes
1 answer

How can I determine the probability of an event in R for a Hyperbolic Distribution?

I would like to know how I can calculate P ≥ -0.0001. I am novice in both Mathematics, Statistics and R. I am currently modelling some Spread Data in R. I have been able to model the data to a specific distribution (in the case of the below example…
user1587280
0
votes
1 answer

Calculate Bias of Parzen WIndows analytically

I'm still having some trouble understanding what Bias and Variance for a specific estimator actually are. I'm working with the definition of Bias as it is found on Wikipedia: If we define kernel-density-estimates as But how can I apply this to…
Potaito
  • 1,181
  • 2
  • 10
  • 32
0
votes
1 answer

Can we generate data from two exponential distributions with correlation -1

https://stats.stackexchange.com/questions/66775/attainable-correlations-for-exponential-random-variables With reference to the above link I want to ask if it is impossible to generate two exponential distributions with correlation -1 ?
0
votes
2 answers

iOS - How To Choose Objects in Array More-So Then Others

I have an array that contains a variety of strings. I want to choose a the objects at indexes 3,7 & 9 more-so then all the other objects..how can I achieve this. (Let's say every time I grab an object within the array, I want there to be a 80%…
Mike Simz
  • 3,976
  • 4
  • 26
  • 43
0
votes
1 answer

Using function to obtain the densities of numeric columns in a data frame in R

I'm trying to get the densities of numeric columns in a data frame and to assign them to new variables. I'm using this function, but when I use it, it happens nothing. I'm kind of lost... Could you help me? densities <- function(data.input,…
0
votes
0 answers

Generating points in space according to a 3D probability grid

If I have a bunch of point called point_set_A (enclosed by a cube for example), each with a normalized probability value (the values are based on something, e.g. flow velocity). How do I populate that same space (cube) with (say 100) point_set_B (so…
Tim
  • 135
  • 1
  • 11
0
votes
1 answer

MATLAB Financial Data Algorithm

So I have a massive excel spreadsheet of historical options data of the S&P 100 at different dates between 2010 and the present date. I am seeking to find the probability density function of the stock at each of these dates. The method for finding…
0
votes
0 answers

R - Fit many distributions to sample, visualize, and sort by g.o.f. test

Is there any package in R that allows fitting many pdfs at the same time to some sample data, plots all fits and the sample histogram, and then allows sorting the fittings by some gof criteria like Kolmogorov-Smirnov, Anderson-Darling, X2, ...?…
Oliver Amundsen
  • 1,491
  • 2
  • 21
  • 40
0
votes
0 answers

Is there a specific Conditional Probability Function for Image Processing in MATLAB?

I am trying to develop a motion estimation image processing algorithm in MATLAB, and as part of a paper that I am following I need to maximize the conditional probability density function for each frame. My question is, is there a pdf function in…
0
votes
2 answers

Tools to use for conditional density estimation in Python

I have a large data set that contains 3 attributes per row: A,B,C Column A: can take the values 1, 2, and 0. Column B and C: can take any values. I'd like to perform density estimation using histograms for P(A = 2 | B,C) and plot the results using…
Oliver Hoffman
  • 540
  • 1
  • 9
  • 22