Mean and variance of a probability density

Click For Summary

Homework Help Overview

The discussion revolves around finding the mean (μ) and variance (σ²) of a given probability density function defined piecewise. The function is specified as f(x) = x for 0 < x < 1, f(x) = 2 - x for 1 ≤ x < 2, and f(x) = 0 elsewhere.

Discussion Character

  • Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the process of calculating the mean and variance by splitting the integrals based on the defined intervals of the probability density function. There are attempts to verify the arithmetic involved in the calculations, particularly in the variance computation.

Discussion Status

Some participants express uncertainty about the arithmetic in the variance calculation, leading to corrections and clarifications regarding the final numerical result. Multiple interpretations of the variance value are being explored, with some suggesting it should be 1/6.

Contextual Notes

Participants are working under the constraints of homework rules, which may limit the extent of guidance provided. There is an emphasis on ensuring the calculations align with the definitions and properties of probability density functions.

toothpaste666
Messages
517
Reaction score
20

Homework Statement


find μ and σ^2 for the following probability density
f(x) = x for 0<x<1
f(x) = 2-x for 1 <= x < 2
f(x) = 0 elsewhere

Homework Equations


μ = ∫xf(x)dx

σ^2 = ∫x^2 f(x)dx - μ^2

The Attempt at a Solution


first we find the mean. we split up the integral into sums of different integrals
since f(x) = 0 from -∞ to 0 and from 2 to ∞ we have
μ = ∫(0to1)x^2dx + ∫(1to2)x(2-x)dx
= ∫x^2dx + ∫2xdx - ∫x^2dx
where the first integral is from 0 to 1 and the others are from 1 to 2
= (1/3)x^3|(0to1) + x^2|(1to2) - (1/3)x^3|(1to2)
= 1/3 + (4-1) - (8/3-1/3) = 1/3 + 3 -7/3 = 3-6/3 = 3-2 = 1

so the mean is 1. now to find the variance
σ^2 = ∫x^3dx + ∫x^2(2-x)dx - 1^2
= ∫x^3dx + ∫2x^2dx - ∫x^3dx - 1
= (1/4)x^4|(0to1) + (2/3)x^3|(1to2) - (1/4)x^4|(1to2) - 1
= 1/4 + (16/3-2/3) - (16/4-1/4) - 1
= 1/4 + 14/3 - 15/4 - 1
= 1.667

am i doing this correctly?
 
Physics news on Phys.org
toothpaste666 said:

Homework Statement


find μ and σ^2 for the following probability density
f(x) = x for 0<x<1
f(x) = 2-x for 1 <= x < 2
f(x) = 0 elsewhere

Homework Equations


μ = ∫xf(x)dx

σ^2 = ∫x^2 f(x)dx - μ^2

The Attempt at a Solution


first we find the mean. we split up the integral into sums of different integrals
since f(x) = 0 from -∞ to 0 and from 2 to ∞ we have
μ = ∫(0to1)x^2dx + ∫(1to2)x(2-x)dx
= ∫x^2dx + ∫2xdx - ∫x^2dx
where the first integral is from 0 to 1 and the others are from 1 to 2
= (1/3)x^3|(0to1) + x^2|(1to2) - (1/3)x^3|(1to2)
= 1/3 + (4-1) - (8/3-1/3) = 1/3 + 3 -7/3 = 3-6/3 = 3-2 = 1

so the mean is 1. now to find the variance
σ^2 = ∫x^3dx + ∫x^2(2-x)dx - 1^2
= ∫x^3dx + ∫2x^2dx - ∫x^3dx - 1
= (1/4)x^4|(0to1) + (2/3)x^3|(1to2) - (1/4)x^4|(1to2) - 1
= 1/4 + (16/3-2/3) - (16/4-1/4) - 1
= 1/4 + 14/3 - 15/4 - 1
= 1.667

am i doing this correctly?

No. Check your arithmetic for the last line.
 
oops. It would be .1667
 
toothpaste666 said:
oops. It would be .1667

No, actually it would be 1/6 exactly.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K
Replies
5
Views
3K