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

Probability Density Functions in R for predicting next value of incidents

I need to do Probability Density Prediction of the following data in R: year = c(1971, 1984, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013) incidents = c(1, 1, 1, 1, 3, 1, 6, 6, 9, 11, 21, 37, 38, 275,…
0
votes
1 answer

Picking an Object randomly based on another Object and probability?

I have a base class called bait that has children classes some bait names, suppose bait1,bait2...etc and another fishes classes fish1,fish2,...etc I want the user to pick a bait and for each bait there is a probability that he catches a certain fish…
MRezk
  • 61
  • 8
0
votes
2 answers

Assign Weibull densities within groups of dataset

I am trying to create a new column on my data.frame (df) with values of Weibull densities. I need to assign densities for vector of quantiles (w) taking into account groups in this df. The subsets are delimited by the variable "plot". Each plot…
Andre Silva
  • 4,782
  • 9
  • 52
  • 65
0
votes
1 answer

Time density given vector of POSIX R

I know it seems stupid question to ask but I'm really struggling with this one: I have a list of events with recorded StartDate values. How do I plot density of events by time? So I want to have a plot where on X axis will be time and on Y axis…
0
votes
1 answer

MATLAB : How to plot pdf

I want to plot the following on the same piece of paper. The pdf of exponential distribution with parameter 5 The pdf of t distribution with parameter 15 I don't know how to draw the pdf but know how to plot several figure on the same piece of paper…
user2983722
  • 215
  • 1
  • 3
  • 11
0
votes
1 answer

How to extract fitted data from normal probability density function

If I fit a uni-variate data with normal distribution, how can i get back the fitted values in MATLAB. I am using this simple example load hospital % data x = hospital.Weight; [mu sigma]=normfit(x) %normal fitting %To visualize the…
Shehroz
  • 347
  • 2
  • 9
  • 25
0
votes
1 answer

Plotting probability density function in matlab

I have a 1x4225 vector that its elements are between 0 and 1 and I want to plot their probability density function in matlab. In the case of ksdensity() the problem is that the probability sometimes gets more than 1. I also tried the code below to…
Saba
  • 61
  • 2
  • 9
0
votes
2 answers

How to sample N points between 0 and R if they are exponentially distributed?

The density of my points x ∈ [0,R] is exponential: ρ(x)~e^x How can I sample N points from there?
user1883163
  • 133
  • 9
0
votes
1 answer

calculate the rate parameter: exponential distribution

I have a set of values which follows exponential distribution. Now, I want to calculate the rate parameter alpha. Can anybody help me how to calculate it (I am using c++ to code it)?
alessandro
  • 1,681
  • 10
  • 33
  • 54
0
votes
1 answer

Statistical brainteaser: How to create random unique 6 digit PINs and distribute to minimise the probability collision

I want to create a script that users can use to generate a pin with, following registration of an email. The pin needs to be 6 digits long and unique; no two users can have the same pin. I have the following code, however haven't been able to…
alias51
  • 8,178
  • 22
  • 94
  • 166
0
votes
2 answers

Triangular distributed random variates (PDF and CDF) in MATLAB

I am facing some error to plot the CDF for Triangular distribution; I can plot the histogram using Generating a Triangular distribution in MATLAB, but how do I plot the CDF? n = 10000; %Random number a = 0.26; %Min b = 0.46; %Max c = 0.35; %Mode…
0
votes
1 answer

Finding The Max Value from Plotted Density Function (Kernel Density Estimation) in R

I have some data I that I'm assuming comes from a distribution and I'm trying to estimate that distribution. Right now I'm using the package KernSmooth in R with a Gaussian kernel and am using the package's dpik() function to automatically select my…
msabin
  • 1
  • 1
  • 1
-1
votes
0 answers

How to setup and evaluate a fast Gaussian Kernel

I have a Gaussian Kernel with 100,000 points, that fits some kind of probability distribution. However, I am having trouble evaluate points on the Kernel. For example, let's say I have a 2D Gaussian Kernel setup on 100,000 2D vectors. Now, I have a…
-1
votes
1 answer

How do I get a smooth outline (with filled area) for this plot?

PDF from histogram data I am trying to get a PDF with a smoother outline. Also, the area under the curve must be filled. How can I get the curve of best fit for this? This is the code I have used. plt.hist( data, range=[0, 60], …
-1
votes
1 answer

How to create pseudo random values using Monte Carlo method?

I have a non-stationary (Periodicity+Trend) time series (Ts) data of one dimension which contains nan values. I want to generate 10000 pseudo-random values of the Ts based on its probability distribution. DATA_LINK distribution of normalized data…