How do i change velocity of my sphere?

Hi, I want to change the velocity of my sphere to velocity.y = -(velocity.y * bounciness). How do I do that in C#?

Thanks In advance

velocity = new Vector3(velocity.x, -(velocity.y * bounciness), velocity.z);