You are Here: Home >< Maths

# Finding the median from the cumulative distribution function watch

1. X has the Cumulative distribution function:

0 for x<0

x/4 for 0≤x≤1

3x/4 - 1/2 for 1<x≤2

1 for x>2

But how do I know which one to choose in order to get the median--F(m)=0.5?
Apparently it's the '3x/4 - 1/2 for 1<x≤2' one.
2. (Original post by zomgleh)
X has the Cumulative distribution function:

0 for x<0

x/4 for 0≤x≤1

3x/4 - 1/2 for 1<x≤2

1 for x>2

But how do I know which one to choose in order to get the median--F(m)=0.5?
Apparently it's the '3x/4 - 1/2 for 1<x≤2' one.
Work out F(x) where the function definition changes, i.e. x=1.

If F(1) is < 0.5 then you know it's in the second interval.
If it's > 0.5 it would be in the first interval.
3. Cheers.
Got another one:

if the CDF is the following:

F(x) = 0 when x<0

1-(2/3)e^(-0.5x) when 0≤x≤2

1 when x>/= 2

Then this represents a mixed distribution- both discrete and continuous, so if we were to calculate P(X=2), the answer reads 2/3 e^-1 which probably means the 2nd interval is being used with 1-F(2). I was wondering why this is the case? Shouldn't the P(X=2) be F(2)-F(0)?
4. (Original post by zomgleh)
Cheers.
Got another one:

if the CDF is the following:

F(x) = 0 when x<0

1-(2/3)e^(-0.5x) when 0≤x≤2

1 when x>/= 2

Then this represents a mixed distribution- both discrete and continuous, so if we were to calculate P(X=2), the answer reads 2/3 e^-1 which probably means the 2nd interval is being used with 1-F(2). I was wondering why this is the case? Shouldn't the P(X=2) be F(2)-F(0)?
It's not a mixed distribution, it's continuous.

x is defined on the interval [0,2], anything less than 0 will have F(x)=0, and anything greater than 2 will have F(x)=1.

P(X=2) = 0

You're looking at a cdf, not a pdf.
5. (Original post by ghostwalker)
It's not a mixed distribution, it's continuous.

x is defined on the interval [0,2], anything less than 0 will have F(x)=0, and anything greater than 2 will have F(x)=1.

P(X=2) = 0

You're looking at a cdf, not a pdf.
It says on the lecture slides that it's a mixed distribution though?

^ where I replaced W with X
6. (Original post by zomgleh)
It says on the lecture slides that it's a mixed distribution though?

^ where I replaced W with X
My apologies. I assumed just glancing at the cdf, that it was continuous at x=0 and x=2.

I'll have another look.
7. (Original post by zomgleh)
...
F(2)-F(0) is the probability that 0<x<=2, not the probabilty that X=2.

I.e. as d goes to zero.
8. (Original post by ghostwalker)
My apologies. I assumed just glancing at the cdf, that it was continuous at x=0 and x=2.

I'll have another look..
No problem. I'm actually a bit unclear about how to recognize whether it is continuous or discrete just looking at the CDF-- is the only way to know this through actually sketching it? since then we can identify step functions from smooth ones?

Also, not sure what you mean when you use these limits:

I.e. as d goes to zero

could you please show me how the 2/3 e^-1 is obtained?
9. (Original post by zomgleh)
No problem. I'm actually a bit unclear about how to recognize whether it is continuous or discrete just looking at the CDF-- is the only way to know this through actually sketching it? since then we can identify step functions from smooth ones?

Also, not sure what you mean when you use these limits:

I.e. as d goes to zero
For the F(2-d), I'm looking at F(x) as x goes to 2, and since the mid portion of the definition is continuous, this is actually 1-(2/3)e^(-0.5x) evaluated at x=2

could you please show me how the 2/3 e^-1 is obtained?
This is F(2) which is 1, minus the limit thing I was refering to, i.e. 1-(2/3)e^(-0.5x) when x=2,

So, we have 1 - (1-(2/3)e^(-1)) = 2/3 e^-1

PS: This is the first time I've seen a question on here about a mixed distribution.
10. (Original post by ghostwalker)
For the F(2-d), I'm looking at F(x) as x goes to 2, and since the mid portion of the definition is continuous, this is actually 1-(2/3)e^(-0.5x) evaluated at x=2

This is F(2) which is 1, minus the limit thing I was refering to, i.e. 1-(2/3)e^(-0.5x) when x=2,

So, we have 1 - (1-(2/3)e^(-1)) = 2/3 e^-1

PS: This is the first time I've seen a question on here about a mixed distribution.
Thanks a lot, I think I get it...except why is F(2)=1? The CDF says: 1 when x>/= 2. But doesn't F(2) by definition mean P(X<=2) ?
11. (Original post by zomgleh)
Thanks a lot, I think I get it...except why is F(2)=1? The CDF says: 1 when x>/= 2.
The pdf would be zero for all values greater than 2. (Ignoring esoteric arguments)

So, F(2)=F(3)=F(pi)=F(1000000) = 1

Not sure if that's captured what you're getting at. ?

But doesn't F(2) by definition mean P(X<=2) ?
Yes.
12. (Original post by ghostwalker)
The pdf would be zero for all values greater than 2. (Ignoring esoteric arguments)

So, F(2)=F(3)=F(pi)=F(1000000) = 1

Not sure if that's captured what you're getting at. ?

Yes.
Okay, I think when you put it that way (with the pdf) it makes sense...
I'm just confused why for a CDF as
1-(2/3)e^(-0.5x) when 0≤x≤2

1 when x>/= 2

when we want F(2), which = P(X<=2), why don't we choose '1-(2/3)e^(-0.5x)' instead of just 1?
13. (Original post by zomgleh)
I'm just confused why for a CDF as
1-(2/3)e^(-0.5x) when 0≤x≤2

1 when x>/= 2

when we want F(2), which = P(X<=2), why don't we choose '1-(2/3)e^(-0.5x)' instead of just 1?
Good question.

Where did you get the definitions of the cdf from, in particular the intervals, as they're not in the scan/photo you posted?
14. (Original post by ghostwalker)
Good question.

Where did you get the definitions of the cdf from, in particular the intervals, as they're not in the scan/photo you posted?
From the same problem, I just typed it out instead (using X instead of W for the random variable), attaching an image though.

It's easy to calculate the P(X=2) from the graph, because it's just the 'jump' of the graph from the smooth part of the curve to the discrete part (step). But I'd like to know how to calculate it without drawing/using the graph.
15. (Original post by zomgleh)
From the same problem, I just typed it out instead (using X instead of W for the random variable), attaching an image though.
There is an important difference between what you posted and the actual question:

'1-(2/3)e^(-0.5x)' is only valid on the half-open interval [0,2) which does not include 2. That's why you don't use it to work out F(2).

It's easy to calculate the P(X=2) from the graph, because it's just the 'jump' of the graph from the smooth part of the curve to the discrete part (step). But I'd like to know how to calculate it without drawing/using the graph.
I've already covered this in posts 7 and 9.
16. (Original post by ghostwalker)
For the F(2-d), I'm looking at F(x) as x goes to 2, and since the mid portion of the definition is continuous, this is actually 1-(2/3)e^(-0.5x) evaluated at x=2

This is F(2) which is 1, minus the limit thing I was refering to, i.e. 1-(2/3)e^(-0.5x) when x=2,

So, we have 1 - (1-(2/3)e^(-1)) = 2/3 e^-1

PS: This is the first time I've seen a question on here about a mixed distribution.
But how is F(2) = 1- the limit thing? As in, don't we just do that when we're getting the P(X> or >/= x) ?
17. (Original post by zomgleh)
But how is F(2) = 1- the limit thing? As in, don't we just do that when we're getting the P(X> or >/= x) ?
I think you've misinterpreted what I was saying.

That was in response to "could you please show me how the 2/3 e^-1 is obtained"

I'm not saying "F(2) = 1- the limit thing"

I was saying F(2) is 1. And then minus the limit thing as part of working out P(X=2).

Putting it slightly differently.

P(X=2)= P(X<=2)-P(X<2)

=F(2) - limit thing

=1 - limit thing.
18. (Original post by ghostwalker)
I think you've misinterpreted what I was saying.

That was in response to "could you please show me how the 2/3 e^-1 is obtained"

I'm not saying "F(2) = 1- the limit thing"

I was saying F(2) is 1. And then minus the limit thing as part of working out P(X=2).

Putting it slightly differently.

P(X=2)= P(X<=2)-P(X<2)

=F(2) - limit thing

=1 - limit thing.
aha! that clears it up. thank you very much indeed.

### Related university courses

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: March 25, 2013
Today on TSR

### Edexcel C2 Core Unofficial Markscheme!

Find out how you've done here

Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams