fix: force demean and ensure sigma calculation returns float