# Computing weighted standard deviation using lowess mean values

I have two questions:

First question:

I want to compute the weighted standard deviation with tri-cubic kernel. I am using lowess function in R to compute the weighted mean using tri-cubic kernel. But unfortunately the lowess function in R does not give the std (or I am not aware of it).
My question is, if I use

1. the mean values computed by R,
2. compute the weight (using tri-cubic kernel) for each point with an span (alpha) of 0.01
3. and put every thing in the formula here,

Is the computed std correct or not? (for example, are the weights that I have computed exactly the same as the ones used by lowess to compute the mean?)

Second question:

why the lowess values computed by R are so different with the ones computed in the smooth function in MATLAB?

• Can you share a little bit about your data, maybe a snippet and some summary stats, and can you share some of the Matlab code that you used? Commented Apr 17, 2021 at 12:10