How to use Sheet and Range protection and Conditional formatting simultaneously in Google Sheet?

Here I gave conditional formatting in the column E , with two colors for the users A and B respectively. Now I want to enable access to A and B for their respective cells in columns F and G. I can do it manually. But I want to do the same for future rows of data, which automatically copies the cell protection rules to columns F and G in respect to the user in the column E. How to do it ?

Sample Google Sheet

Solving for Conditional Variance

I am working on a problem and am a little bit confused.

The problem:

P(X=0,Y=0) = .80

P(X=1,Y=0) = .05

P(X=0,Y=1) = .025

P(X=1,Y=1) = .125

Find Var(Y|X=1)

What I have done so far: (using)

E(Y$ ^2$ |X=1) – $ \big($ E(Y|X=1)$ \big)$ $ ^2$

But with this I have been getting:

E(Y|X=1) = $ (0)(.05) + (1)(.125)\over(.05+.125)$ = .71

and

E(Y$ ^2$ |X=1) = $ (0)^2(.05) + (1)^2(.125)\over(.05+.125)$ = .71

But with this we get the same answer so that when we do E(X$ ^2$ ) – (EX)$ ^2$

We get:

.71 – .71 = 0

This doesn’t seem like it is the right answer to me?

Error Fix Xcode 10, Swift 4 initializer for conditional must have optional.

So I’m working on a savings app using a table view controller. I ran into an error, and I couldn’t find a fix.

if let sourceViewController = sender.source as? SavingsTableViewController, let saving = sourceViewController.savings {         let newIndexPath = IndexPath(row: saving.count, section: 0)         saving.append(saving)         SavingsTableViewController.insertRows(at: [newIndexPath], with: .automatic)     } 

The error shows up as Initializer for conditional binding must have Optional type, not ‘[Savings]’

Thanks for the help!