Gamma distribution [closed] - probability

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Let X~gamma(2,1).
Find:
P(X>=2)
(X<=10)
I'm struggling to determine how to solve this. I know you must integrate some function from 2 to infinity and 0 to 10 but don't know what to integrate.

There are actually two ways to define Gamma-distribution - one with scaling 'theta' and another with inverse scale 'beta', see https://en.wikipedia.org/wiki/Gamma_distribution
Fortunately, for parameter value of 1 there is no difference.
So you have to integrate PDF
f(x) = (1/G(2)) * x * exp(-x)
Gamma function at 2 is equal to 1. G(2)=1, so
P(x) = S x exp(-x) dx
where S is integration notation.
P(x) = -(x+1)*exp(-x)
So now you have to substitute limits

Related

How to print random numbers from 2 given arrays without repeating if already printed on ruby [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
lets suppose
al=['Al','2l','3l','4l','5l','6l','7l','8l','9l','jl','ql','kl']
af=['Af','2f','3f','4f','5f','6f','7f','8f','9f','jf','qf','kf']
ak=['Ak','2k','3k','4k','5k','6k','7k','8k','9k','jk','qk','kk']
an=['An','2n','3n','4n','5n','6n','7n','8n','9n','jn','qn','kn']
are array
let's suppose
there a two-person wait for random numbers to get
but they should not get the same word ( 3 outputs should be to 2 people from 4 arrays without repeating
)
Use Array#sample and then Enumerable#each_slice:
persons, cards = 2, 3
(al + af + ak + an).sample(persons * cards).each_slice(cards).to_a
#⇒  [["qk", "4l", "Ak"], ["6l", "8l", "5l"]]

What is the fastest way to multiply a number by 2? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am aware that there are multiple ways of multiplying numbers by 2:
v << 1
v * 2
v >> -1
v + v
v - -v
Which is fastest?
I am using Assembly on an intel x86 processor.
There's obviously not one answer here. The answer will depend on the specific processor in use, at least.
Most of the time, your compiler will know, so most of the time, you can just write * 2 in your code, maximizing clarity to your readers and efficiency.
If you really care, you'll have to perform careful measurements yourself.
(Also, multiplying by two is so basic that there might not even be a measurable difference between v * 2, v + v, and v << 1.)

Pso based image enhacment [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to enhance my image by using pso based gray level image enhacment.I send the algorithm but i dont understand how I get particle of my image.pso paper
You only need to carefully read the section B. Proposed methodology. It says something like this:
Now our aim is to find the best set of values
for these four parameters which can produce the optimal result
and to perform this work PSO is used. P number of particles
are initialized, each with four parameters a, b, c, and k by the
random values within their range and corresponding random
velocities.
So there you have your particle generation. Each particle is a set of 4 random values.

What would be the language generated by Σ*-x? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Say, for example, Σ={x,y}.
And you carried out the operation Σ*-x. What would be the resulting language? Would it essentially be y* or would it just minus one occurrence of x in all strings generated in Σ*?
i.e xxyyxx to xyyxx.
It would be the language of all strings generated by Σ* minus the string x. (so: xx, epsilon, xyx, y, etc... but not x)

an algorithm with some arithmetics [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to write a particular function which does some calculation but i have no idea what the algorithm should be:
Requirement
I want to write a function in which you pass in a number and it returns a value from 0 to 1.
if i pass in a 0, it returns a 1 and as you increase the value of the input the output gets closer to 0.
This is similar to a y = 1/x function
but i want to set markers such as if the input is 300, it returns a 0.75 and if it is 600 it returns a 0.5
Is there such a formula which can help me do this?
I have come up with a function which does this!
I used Lagrangian Interpolation but it's not very simple. Instead, another (far more simple) answer that works only until 600;
f(x)=-(x-1200)/1200
If you know range high value, say for example 1200
The output should be 1-(300/1200) = 1 - 0.25 = 0.75
For input x, Formula is 1 - (x/Rangehighvalue)

Resources