Please see my code to do a problem in Griffith’s quantum mechanics. But I have a feel that my code is really lengthy and is not general. Is there a way to make this general? or any easy alternatives?
Tag: probability
Probability distribution with random paremeters
Is it possible to set something like this? A probability distribution with random parameters
p = BetaDistribution[1, 1] count = BinomialDistribution[10, p] (* and to calculate stuff like: *) Expectation[count] Probability[count == 3 \[Conditioned] p > 1/2] ```
Distributional error probability of deterministic algorithm implies error probability of randomized algorithm?
Consider some problem $ P$ and let’s assume we sample the problem instance u.a.r. from some set $ I$ . Let $ p$ be a lower bound on the distributional error of a deterministic algorithm on $ I$ , i.e., every deterministic algorithm fails on at least a $ p$ fraction of $ I$ .
Does this also imply that every randomized algorithm $ \mathcal{R}$ must fail with probability $ p$ if, again, we sample the inputs u.a.r. from $ I$ ?
My reasoning is as follows: Let $ R$ be the random variable representing the random bits used by the algorithm. \begin{align} \Pr[ \text{$ \mathcal{R}$ fails}] &= \sum_\rho \Pr[ \text{$ \mathcal{R}$ fails and $ R=\rho$ }] \ &= \sum_\rho \Pr[ \text{$ \mathcal{R}$ fails} \mid R=\rho] \Pr[ R=\rho ] \ &\ge p \sum_\rho \Pr[ R=\rho ] = p. \end{align} For the inequality, I used the fact that once we have fixed $ R = \rho$ , we effectively have a deterministic algorithm.
I can’t find the flaw in my reasoning, but I would be quite surprised if this implication is true indeed.
Offline binpackaging problem: probability of a nonoptimal solution for the firstfitdecreasing algorithm
For the offline bin packaging problem (nonbounded number of bins, where each bin has a fixed size, and a input with known size that can be sorted beforehand), the firstfitdecreasing algorithm (FFD) gives a solution whose number of bins is, at most, $ \frac{11}{9}\times S_{opt} + \frac{6}{9}$ , or, for the sake of simplification, around $ 23\%$ bigger than the optimal number of bins ($ S_{opt}$ ).
Has the probability of getting a nonoptimal solution using FFD been ever calculated? Or, in other words, what is the probability of getting a solution whose exact size is $ S_{opt}$ ? Or do we have no other choice than assuming that the solution size is evenly distributed in the interval $ [S_{opt}, \frac{11}{9}\times S_{opt} + \frac{6}{9}]$ ? Or, as another alternative I can think of right now, is the solution size so dependant on the input that making this question has no sense at all?
And, as a related question, is there any research about what is the NPhard or NPcomplete problem that has an approximation algorithm (of polynomial asymptotic order) with the highest probability of providing an optimal solution?
Probability of winning a turnbased game with a random element
I am preparing for a programming exam on probability theory and I stumbled across a question I can’t solve.
Given a bag, which contains some given amount of white stones $ w$ and some given amount of black stones $ b$ , two players take turns drawing stones uniformly at random from the bag. After each player’s turn a stone, chosen uniformly at random, vanishes, and only then does the other player take their turn. If a white stone is drawn, the player, who has drawn it, instantly loses and the game ends. If the bag becomes empty, the player, who played second, wins.
What is the overall probability that the player, who played second, wins?
I assume it’s a dynamic programming question, though I can’t figure out the recursion formula. Any help would be greatly appreciated. ðŸ™‚
Example input: $ w$ = 3, $ b$ = 4, then the answer is, I believe, 0.4, which I arrived at after computing by hand all possible ways for the game to go, so not very efficient.
How to calculate probability of values under Weibull distribution?
I have a Genomic data that shows the interaction between genomic regions that I would like to understand which interactions are significant statistically.
Dataset look likes:
chr start1 end1 start2 end2 normalized count 1 500 1000 2000 3000 1.5 1 500 1000 4500 5000 3.2 1 2500 3500 1000 2000 4
So, I selected a random number of data (as background) and fitted the normalized frequency into the Weibull distribution using fitdistrplus R packages
and estimated some parameters like scale and shape for those sets of data (PD = fitdist(data$ normalized count,'weibull')
).
Now I would like to calculate the probability of each observation (like a pvalue for each data point) under the fitted Weibull distribution.
But I do not know how can I do that, Can I calculate the Mean of distribution then calculated Zstatistic for each observation and convert it to the pvalue?
for example:
The random background that fitted to Weibull using the below parameters:
scale:0.12 shape:023 Mean: 20 Var:12
How can I calculate the probability of sets of data like (1.2,2.3,4.5,5.0,6.1)?
Which modifier added to a 1D20 has the closest outcome probability as rolling 2D20 with advantage with no modifier?
I’m trying to determine the probability of every modifier to a 1D20:
1D20 +1 1D20 +2 1D20 +3 1D20 +4 1D20 +5
vs flat 2D20s with advantage
2D20 (Keep highest) 3D20 (Keep highest) 4D20 (Keep highest)
Any help would be highly appreciated
What is the probability of a hero hitting an enemy using the The Fate Deck and SAGA rules?
I am running a game and I have a player interested in knowing the probability of his attacks hitting an enemy creature.
 What is the probability given a hand of 5 cards?
Also useful to this answer is the probability given a hand of 4, 3, 2 or 1 cards.
Is any randomized Algorithm a probability distribution over the set of deterministic Algorithms?
If there is a finite set of Instances of size n and the set of (reasonable) deterministic algorithms is finit.
Can any randomized Algorithm be seen as a probability distribution over the set of deterministic Algorithms? And if yes, why?
A player rolls four 20sided dice, takes the lowest value, ignores the rest. What is the probability of this value at least 7?
I’m designing a tabletop game, and I need to figure out how to calculate a few probabilities:
 Roll 3 20sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?

 Roll 4 20sided dice, take the highest value. What is the probability of it being 7 or higher? 15 or higher?

 Roll 3 20sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?

 Roll 4 20sided dice, take the lowest value. What is the probability of it being 7 or higher? 15 or higher?
How can I do this? Could you explain to me how this works, or even better – give me a simple formula?