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

How to randomise sampling of a matrix using different distributions

I have a 3x3 matrix that looks like this: input_df C1 C2 C3 Row1 0 5 10 Row2 5 10 11 Row3 100 0 243 The actual data frame is 50x10, I'm using a 3x3 for demonstration purposes. I'm…
0
votes
1 answer

How to fit and calculate conditional probability of copula in Python

I would like to fit a copula to a dataframe with 2 columns: a and b. Then I have to calculate the conditional probability of a < 0, when b<-2 (i.e. P(a<0|b<-1). I have tried the following code in python using the library copula; I am able to fit the…
lsr729
  • 752
  • 2
  • 11
  • 25
0
votes
0 answers

Y-Axis Scaling to normal distribution

I want to create a cumulative frequency plot with probability scaling on the y-axis. When I transform the y-axis from the regular scaling to the probability scaling, the scale is not applied correctly. plt <- ggplot(df, aes(df[,"test_values"])) plt…
Kenne
  • 11
  • 3
0
votes
0 answers

How to draw a colourmap that distincly shows the points when there is a lot of data?

I am currently plotting a graph where the x and y axes help me represent a unique point and at that point, I use a certain colour to indicate the frequency of the point. The points have a frequency from 0 to all the way until 200,000. Now having…
0
votes
1 answer

Wining prizes based off probabilities

I was curious on how wheel spinning based of chances algorithm would work so I wrote this code I created an object with each prize and its probability const chances = { "Apple" : 22.45, "Peaches" : 32.8, "Grapes" : 20, …
DeaViNG
  • 27
  • 4
0
votes
1 answer

How can I use simulation tool in Excel for solving the following problem related to probability?

Trial Number 1 2 3 4 5 ........ 2000000 (two million) Success in nth attempt 12 4 21 5 10 12 Note: Imagine throwing a dice where each outcome has probability of 1/10 (not 1/6 as it is usual for dice).…
0
votes
0 answers

Hidden Markov Model Output Error (Python): Sequence is Impossible

I am trying to predict the state of rain based on observed rainfall in centimeters. The three states are ' little rain' 'some rain' and 'a lot of rain'. For the prediction, when I enter the amount of rainfall, I am getting an error below. Can…
0
votes
0 answers

Multi Dimensional Sample from a given distribution

I'm trying to genrate a binary sample with multiple dimensions of which i can control the probability distribution as well, i found it useful with torch.distributions.binomial which allows controlling the probability distribution but dosen't help…
0
votes
1 answer

How do I find if 2 random variables are conditionally independent given the joint conditional PMF?

This is the question, but I can not find a way on how to tackle it... I know that if they are independent then: p(X, Y|Z) = p(X|Z)p(Y|Z) p(X|Y, Z) = p(X|Z) p(Y|X, Z) = p(Y|Z) Does someone have some tips on how to tackle this?
0
votes
0 answers

How do I generate numbers according to a parabolic distribution?

I have a function which plots the distribution of ions emitted as a function of the angle of emission. To simulate the emission I would like to sample values according to the function, but I'm struggling to do so. The function is: where theta_0 is…
Alex
  • 1
0
votes
0 answers

Changing probability distribution graph with sliders in Python

I'm trying to visualize Kullback-Leibler divergence (how much one prob. dist. differs from another) by plotting two normal probability distribution graphs on top each other. I want to change mean and std. value of each graph using sliders, but I…
user16492384
0
votes
1 answer

Finding a 95% confidence interval given a table of observations

I have the following table: perc 0 59.98797 1 61.89383 2 61.08403 3 61.00661 4 62.64753 5 62.18118 6 60.74520 7 57.83964 8 62.09705 9 57.07985 10 58.62777 11 60.02589 12 58.74948 13 59.14136 14 58.37719 15 58.27401 16 …
0
votes
1 answer

Convert PCFG to CNF: with null production rules

There have been similar questions, like this or this, but mine is different: Let's say, I have a probabilistic context-free grammar (PCFG) S --> A [1/2] | B [1/2] A --> eps [p] | AA [q] | x [r] B --> y [1] where eps is an empty string, p + q + r =…
Antoine
  • 862
  • 7
  • 22
0
votes
0 answers

"Insufficient data" error while plotting Siberdensityplot of Layman's metrics

When I try to plot the siberDensityPlot of my Posterior probability distribution of the 6 Layman's metrics, I get the following error when running the Siberdensityplot() Error in hdrcde::hdr(SEA.B[, j], probs, h = stats::bw.nrd0(SEA.B[, j]))…
0
votes
1 answer

Binomial Distribution problem using Montee Carlo

Here, I tried to compute probability of getting one 4 times when I toss a die 6 times. Here is my code, no=0 import random as rd for i in range(1000): l=[rd.randint(1,6) for i in range(6)] a=l.count(1) if a==4: no+=1 print(no/1000) I…