Instantly see the issue here. What you basically doing is the following:
<?php
$var = 'foo';
<?php echo $foo; ?>
?>
You're using duplicate <?php
tags which will cause issues.
Use the following instead
<?php
$document = JFactory::getDocument();
$variable = "test";
$document->addScriptDeclaration('
jQuery(document).ready(function () {
var simple = "' . $variable . '";
alert(simple);
});
');
?>
You were also missing a closing single quote before the last bracket in your code which I've added for you.