Questions tagged [probability-distribution]

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

What is it?

A probability distribution is a function that defines the probability of occurrences of the different possible values of a variable.

Typical examples of distributions are the uniform distribution in which each value has the same probability, the normal distribution in which the values around the avergage have a higher probability and the extreme values the lowest probability.

See also

315 questions
0
votes
1 answer

Access method for distribution-sampled random numbers generation in Numpy

I am interested in knowing which method Numpy uses in numpy.random to generate random numbers distributed as beta, lognormal, Weibull distributions, among others. In the documentation they often discuss the shape of the distribution, but how can I…
Pablo
  • 87
  • 5
0
votes
2 answers

Efficient way to create the probability distribution of a list of numbers with numpy

This is an example of what I am trying to do. Suppose the following numpy array: A = np.array([3, 0, 1, 5, 7]) # in practice, this array is a huge array of float numbers: A.shape[0] >= 1000000 I need the fastest possible way to get the following…
isedgar
  • 43
  • 6
0
votes
1 answer

[Python - scipy]: Genarate random samples from custom multivariate Probability Density Function (PDF)

I want to generate random sample (vector X): X = [x1, x2, x3, ..., x_d] where X follows a custom multivariate Probability Density Function. I am using Python - scipy and I overvide the PDF function to follow a combination of multivariate normal…
0
votes
1 answer

Resample a distribution conditional on another value

I would like to create a series of simulated values by resampling from empirical observations. The data I have are time series of 1-minute frequency. The simulations should be made on an arbitrary number of days with the same times each day. The…
RVA92
  • 666
  • 4
  • 17
0
votes
1 answer

How can I find MLE estimates for the parameters in the function below?

I have a new function given which I would like to estimate its parameters; a,b,alpha,vartheta using MLE. How do I make an estimation? EMHL<-function(a,b,alpha,vartheta) { (2*a*b*alpha*vartheta* (x^(vartheta-1))* exp(-x^vartheta) * …
0
votes
1 answer

getting residue of linear regression

if a Best Fit calculation routine finds Slope, intercept of linear regression of x and y, how to find residue?. - for (i=0;i
umc
  • 39
  • 3
0
votes
0 answers

Learning Probability in R

I'm self-teaching R over here, and have a problem in DataCamp that I don't understand the solution to. When you run count(), I understand that it counts the frequency of each category, but does it automatically create a new column, n, as well? …
0
votes
1 answer

Cumulative Distribution Function from input histogram

I would like to build the Cumulative Distribution Function (CDF) from an input file that contains the data to generate a histogram. The input file has one column per bin and one column with the amount of ocurrences inside each bin, so it looks like…
0
votes
1 answer

Histogram for probability distribution in R

I am trying to figure out how to draw a histogram for the probability distribution over the number of 6s when rolling five dice. My code in R looks like this: library(polynom) library(ggplot2) library(gridExtra) pd <- function(n){ s = 6 …
0
votes
1 answer

Complex Probability - probability that the cow brought to show

I am stuck while solving below probability problem? Anyone in position to help me over here Question: Suppose a farmer has 40 cattle in his herd, of which 10 have ideal muscle structure and 4 have rare markings, with 1 cow having both traits. He…
0
votes
3 answers

How to pick an element from an array with a probability distribution?

I have a mathematical/programming question about a problem I am trying to solve. Given this simple array of integers: int[] goals = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; Do you know how could I implement a function to pick an element from the array…
alejandroMAD
  • 251
  • 2
  • 13
0
votes
1 answer

Weighted Random Selection

Please. I have two tables with the most common first and last names. Each table has basically two fields: Tables CREATE TABLE "common_first_name" ( "first_name" text PRIMARY KEY, --The text representing the name "ratio" numeric NOT NULL, --…
0
votes
1 answer

Creating and visualizing a joint probability distribution in R

I would like to create a joint probability distribution by combining two dataframes. Each dataframe contains data drawn from the same population, but the data is not matched. For the sake of providing workable code, imagine that the data is as…
SolarSon
  • 11
  • 4
0
votes
0 answers

Poisson process: exponential inter arrival time VS exponential serivce duration

I know that the inter arrival times in a Possion process is exponentially distributed. So I assume when I use the matlab command as below, the outputs follow the definition. services= poissrnd(20,1,4) %like for 4 time units. t=1,2,3,4 %output is…
0
votes
1 answer

TensorFlow Probability: Different log probabilities for Sequential vs Named JointDistributions?

I'm fairly new to Bayesian estimation with TensorFlow. I was trying to set up a very simple regression of height on weight (using McElreath's Howell data) to familiarize myself with the machinery in TensorFlow Probability, but I am running into…